X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffunction-documentation.cc;h=99fbdfe6c8ce17838c2f58a90f1eba3517995a4d;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=8535f7f2a672fc0c80c411bdc7589b4a55e8220c;hpb=958e95822083954cad00e0a598eb9f12ceba67b9;p=lilypond.git diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index 8535f7f2a6..99fbdfe6c8 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -18,13 +18,27 @@ */ #include +#include using namespace std; #include "std-string.hh" #include "lily-guile.hh" #include "warn.hh" -static SCM doc_hash_table; +/* type predicates. */ +#include "global-context.hh" +#include "input.hh" +#include "item.hh" +#include "music.hh" +#include "music-function.hh" +#include "paper-score.hh" +#include "performance.hh" +#include "protected-scm.hh" +#include "spanner.hh" +#include "stream-event.hh" +#include "unpure-pure-container.hh" + +static Protected_scm doc_hash_table; void ly_check_name (const string &cxx, const string &scm_name) @@ -45,8 +59,8 @@ ly_add_function_documentation (SCM func, if (doc == "") return; - if (!doc_hash_table) - doc_hash_table = scm_permanent_object (scm_c_make_hash_table (59)); + if (!doc_hash_table.is_bound ()) + doc_hash_table = scm_c_make_hash_table (59); string s = string (" - ") + "LilyPond procedure: " + fname + " " + varlist + "\n" + doc; @@ -64,8 +78,6 @@ LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation return doc_hash_table; } -#include - map type_names; void @@ -87,18 +99,6 @@ predicate_to_typename (void *ptr) return type_names[ptr]; } -/* type predicates. */ -#include "global-context.hh" -#include "input.hh" -#include "item.hh" -#include "music.hh" -#include "music-function.hh" -#include "paper-score.hh" -#include "performance.hh" -#include "spanner.hh" -#include "stream-event.hh" -#include "unpure-pure-container.hh" - void init_func_doc () {