]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-iterator.cc
* scm/define-context-properties.scm:
[lilypond.git] / lily / music-iterator.cc
index 14b084780ba88b6f134fea2b224f16b8c9fd6db9..326b97502886559ab3140f6e07f1c2573ecbcd77 100644 (file)
@@ -3,16 +3,14 @@
 
   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>
 */
 
-/*
-  UGH. too many includes.
-*/
 
 #include "music-iterator.hh"
 
 #include <cstdio>
+using namespace std;
 
 #include "warn.hh"
 #include "context.hh"
@@ -91,7 +89,7 @@ Music_iterator::get_static_get_iterator (Music *m)
        p = new Simple_music_iterator;
 
       iter = p->self_scm ();
-      scm_gc_unprotect_object (iter);
+      p->unprotect ();
     }
 
   p->music_ = m;
@@ -206,7 +204,7 @@ Music_iterator::print_smob (SCM sm, SCM port, scm_print_state*)
   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;
 }
@@ -238,9 +236,7 @@ bool
 is_child_context (Context *me, Context *child)
 {
   while (child && child != me)
-    {
-      child = child->get_parent_context ();
-    }
+    child = child->get_parent_context ();
 
   return child == me;
 }