]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/stencil-expression.cc
Run `make grand-replace'.
[lilypond.git] / lily / stencil-expression.cc
index d4f5d96011f34a4f167da9e2e8579d3ea7ad6b9e..ea9c08871979a16620974b071798210c0b6c63b3 100644 (file)
@@ -4,22 +4,22 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
+  (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "stencil.hh"
 
-#include "protected-scm.hh"
-
-static Protected_scm heads;
+static SCM heads;
 
 void register_stencil_head (SCM symbol)
 {
-  scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T);
-  heads = scm_cons (symbol, heads);
+  if (!heads)
+    heads = scm_permanent_object (scm_cons (SCM_EOL, SCM_EOL));
   
+  scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T);
+  scm_set_cdr_x (heads,  scm_cons (symbol, scm_cdr (heads)));
 }
+
 bool
 is_stencil_head (SCM symbol)
 {
@@ -30,6 +30,6 @@ is_stencil_head (SCM symbol)
 SCM
 all_stencil_heads ()
 {
-  return heads;
+  return scm_cdr (heads);
 }
-  
+