]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-closure.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / grob-closure.cc
index 5e4035f7e898f343b0b22469ec8d3bd03309ea63..81bd393adb98de880c1a05e26a77dc16b9fe30dc 100644 (file)
@@ -37,7 +37,8 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
       && !ly_is_procedure (data)
       && !is_simple_closure (data))
     {
-      g->set_property (axis_offset_symbol (a), proc);
+      g->internal_set_property (axis_offset_symbol (a),
+                               proc);
       return ;
     }
 
@@ -52,7 +53,8 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
     proc = ly_make_simple_closure (scm_list_1 (proc));
   
   SCM expr = scm_list_3 (plus, proc, data);
-  g->set_property (axis_offset_symbol (a), ly_make_simple_closure (expr));
+  g->internal_set_property (axis_offset_symbol (a),
+                           ly_make_simple_closure (expr));
 }
 
 
@@ -75,18 +77,13 @@ chain_offset_callback (Grob *g, SCM proc, Axis a)
     data = ly_make_simple_closure (scm_list_1  (data));
   else if (is_simple_closure (data))
     data = simple_closure_expression (data);
-  else
-    /*
-      Data may be nonnumber. In that case, it is assumed to be
-      undefined.
-    */
-    
-    data = SCM_UNDEFINED;
-
+  else if (!scm_is_number (data))
+    data = scm_from_int (0);
+  
   SCM expr = scm_list_2 (proc, data);
-  g->set_property (axis_offset_symbol (a),
-                  
-                  // twice: one as a wrapper for grob property routines,
-                  // once for the actual delayed binding. 
-                  ly_make_simple_closure (ly_make_simple_closure (expr)));
+  g->internal_set_property (axis_offset_symbol (a),
+                           
+                           // twice: one as a wrapper for grob property routines,
+                           // once for the actual delayed binding. 
+                           ly_make_simple_closure (ly_make_simple_closure (expr)));
 }