]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 5057/4: Stop SCM/int confusion in function documentation tables
authorDavid Kastrup <dak@gnu.org>
Sat, 4 Feb 2017 22:09:01 +0000 (23:09 +0100)
committerDavid Kastrup <dak@gnu.org>
Sat, 11 Feb 2017 07:49:56 +0000 (08:49 +0100)
lily/function-documentation.cc

index 756f174512417ef14a58e3722d2ec84ebb72356a..99fbdfe6c8ce17838c2f58a90f1eba3517995a4d 100644 (file)
@@ -33,11 +33,12 @@ using namespace std;
 #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 SCM doc_hash_table;
+static Protected_scm doc_hash_table;
 
 void
 ly_check_name (const string &cxx, const string &scm_name)
@@ -58,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;