]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tweak-registration.cc
Fix #106 and problems with 'modern accidental style.
[lilypond.git] / lily / tweak-registration.cc
index 9604c5f202bde81dd60e7e7a6a7917e3f4d301fa..95ff32d06a4df58cfc3134d6eaf435f82443bb45 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "tweak-registration.hh"
@@ -18,7 +18,7 @@ Tweak_registry::Tweak_registry ()
   undumper_ = 0;
   smobify_self ();
   undumper_ = new Object_key_undumper ();
-  scm_gc_unprotect_object (undumper_->self_scm ());
+  undumper_->unprotect ();
 }
 
 Tweak_registry::~Tweak_registry ()
@@ -30,7 +30,7 @@ Tweak_registry::clear ()
 {
   tweaks_.clear ();
   undumper_ = new Object_key_undumper ();
-  scm_gc_unprotect_object (undumper_->self_scm ());
+  undumper_->unprotect ();
 }
 
 void
@@ -54,7 +54,7 @@ Tweak_registry::insert_tweak_from_file (SCM tweak)
 void
 Tweak_registry::insert_grob_tweak (Grob *g, SCM tweak)
 {
-  Object_key const *key = g->get_key ();
+  Object_key const *key = g->key ();
   if (tweaks_.find (key) == tweaks_.end ())
     tweaks_[key] = SCM_EOL;
 
@@ -64,14 +64,14 @@ Tweak_registry::insert_grob_tweak (Grob *g, SCM tweak)
 void
 Tweak_registry::replace_grob_tweak (Grob *g, SCM tweak)
 {
-  Object_key const *key = g->get_key ();
+  Object_key const *key = g->key ();
   tweaks_[key] = scm_cons (tweak, SCM_EOL);
 }
 
 SCM
 Tweak_registry::get_tweaks (Grob *g)
 {
-  Object_key const *key = g->get_key ();
+  Object_key const *key = g->key ();
   if (tweaks_.find (key) == tweaks_.end ())
     return SCM_EOL;
   return tweaks_[key];