]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
release: 1.5.8
[lilypond.git] / lily / all-font-metrics.cc
index 6d728efd0a2dcc90084c6551bdecc75cbf8366b9..b198384426c8a4388b7409a6e4e0da8c7b6fc79f 100644 (file)
@@ -30,8 +30,8 @@ All_font_metrics::All_font_metrics (String path)
 
 All_font_metrics::~All_font_metrics ()
 {
-  scm_unprotect_object (afm_p_dict_->self_scm ());
-  scm_unprotect_object (tfm_p_dict_->self_scm ());
+  scm_gc_unprotect_object (afm_p_dict_->self_scm ());
+  scm_gc_unprotect_object (tfm_p_dict_->self_scm ());
 }
 
 Adobe_font_metric *
@@ -52,8 +52,8 @@ All_font_metrics::find_afm (String name)
 
       if (path.empty_b ())
        {
-         char  * p = ly_find_afm (name.ch_C ());
-         if (p)
+         String p = ly_find_afm (name.ch_C ());
+         if (p.length_i ())
            path = p;
        }
 
@@ -72,7 +72,7 @@ All_font_metrics::find_afm (String name)
 
       afm_p_dict_->set (sname,val);
 
-      scm_unprotect_object (val);
+      scm_gc_unprotect_object (val);
 
 
       Adobe_font_metric *afm
@@ -145,7 +145,7 @@ All_font_metrics::find_tfm (String name)
       unsmob_metrics (val)->description_ = gh_cons (name_str, gh_double2scm (1.0));
       tfm_p_dict_->set (sname, val);
 
-      scm_unprotect_object (val);
+      scm_gc_unprotect_object (val);
     }
 
   return