source file of the GNU LilyPond music typesetter
- (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "stencil.hh"
-#include "protected-scm.hh"
-
-static Protected_scm heads = SCM_EOL;
+static SCM heads;
void register_stencil_head (SCM symbol)
{
+ 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);
- heads = scm_cons (symbol, heads);
+ scm_set_cdr_x (heads, scm_cons (symbol, scm_cdr (heads)));
}
+
bool
is_stencil_head (SCM symbol)
{
SCM
all_stencil_heads ()
{
- return heads;
+ return scm_cdr (heads);
}