source file of the GNU LilyPond music typesetter
- (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
/*
#include "music-iterator.hh"
#include <cstdio>
+using namespace std;
#include "warn.hh"
#include "context.hh"
SCM ctor = m->get_property ("iterator-ctor");
SCM iter = SCM_EOL;
- if (ly_c_procedure_p (ctor))
+ if (ly_is_procedure (ctor))
{
iter = scm_call_0 (ctor);
p = unsmob_iterator (iter);
p = new Simple_music_iterator;
iter = p->self_scm ();
- scm_gc_unprotect_object (iter);
+ p->unprotect ();
}
p->music_ = m;
char s[1000];
Music_iterator *iter = unsmob_iterator (sm);
- sprintf (s, "#<%s>", classname (iter));
+ sprintf (s, "#<%s>", iter->class_name ());
scm_puts (s, port);
return 1;
}
is_child_context (Context *me, Context *child)
{
while (child && child != me)
- {
- child = child->get_parent_context ();
- }
+ child = child->get_parent_context ();
return child == me;
}