X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob-closure.cc;h=81bd393adb98de880c1a05e26a77dc16b9fe30dc;hb=9f3572d98bb948c9689cd1f75401a029451fa001;hp=5e4035f7e898f343b0b22469ec8d3bd03309ea63;hpb=04265f11d1f21416ccebd2dcaa1d903dc781b36e;p=lilypond.git diff --git a/lily/grob-closure.cc b/lily/grob-closure.cc index 5e4035f7e8..81bd393adb 100644 --- a/lily/grob-closure.cc +++ b/lily/grob-closure.cc @@ -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))); }