X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstencil-expression.cc;h=6e51ec9b9d5ec334340c0617affdaf61b269698d;hb=c2ccda3e91d408453744bd03882c6b0584a9561a;hp=06fe314fd0e5e043fe9cc604149e3711257e172c;hpb=260073be07f49a5f6f3be8df2af52873843eec60;p=lilypond.git diff --git a/lily/stencil-expression.cc b/lily/stencil-expression.cc index 06fe314fd0..6e51ec9b9d 100644 --- a/lily/stencil-expression.cc +++ b/lily/stencil-expression.cc @@ -4,22 +4,22 @@ source file of the GNU LilyPond music typesetter - (c) 2005 Han-Wen Nienhuys - + (c) 2005--2006 Han-Wen Nienhuys */ #include "stencil.hh" -#include "protected-scm.hh" - -static Protected_scm heads = SCM_EOL; +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); } - +