From: Han-Wen Nienhuys Date: Sat, 28 Oct 2006 18:51:39 +0000 (+0000) Subject: internal_get_property_data() using ly_symbol2scm() X-Git-Tag: release/2.10.0-2~53^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a7d0aa3eb771813c485f4923deedd7d1ad4cd24d;p=lilypond.git internal_get_property_data() using ly_symbol2scm() --- diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index e9891d216a..88055cb0bb 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -75,8 +75,8 @@ Bar_number_engraver::acknowledge_break_aligned (Grob_info inf) if (text_ && !text_->get_parent (X_AXIS) && dynamic_cast (s) - && (s->get_property_data (ly_symbol2scm ("break-align-symbol")) - == text_->get_property_data (ly_symbol2scm ("break-align-symbol")))) + && (s->get_property_data ("break-align-symbol") + == text_->get_property_data ("break-align-symbol"))) { /* By default this would land on the Paper_column -- so why diff --git a/lily/beam.cc b/lily/beam.cc index d114c69fc3..dcbed75ce5 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -557,7 +557,7 @@ Beam::get_default_dir (Grob *me) { Grob *s = stems[i]; Direction stem_dir = CENTER; - SCM stem_dir_scm = s->get_property_data (ly_symbol2scm ("direction")); + SCM stem_dir_scm = s->get_property_data ("direction"); if (is_direction (stem_dir_scm)) { stem_dir = to_dir (stem_dir_scm); @@ -613,7 +613,7 @@ Beam::set_stem_directions (Grob *me, Direction d) { Grob *s = stems[i]; - SCM forcedir = s->get_property_data (ly_symbol2scm ("direction")); + SCM forcedir = s->get_property_data ("direction"); if (!to_dir (forcedir)) set_grob_direction (s, d); } @@ -668,7 +668,7 @@ Beam::consider_auto_knees (Grob *me) */ head_extents += stem->relative_coordinate (common, Y_AXIS); - if (to_dir (stem->get_property_data (ly_symbol2scm ("direction")))) + if (to_dir (stem->get_property_data ("direction"))) { Direction stemdir = to_dir (stem->get_property ("direction")); head_extents[-stemdir] = -stemdir * infinity_f; diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index 47c0a9b427..896913bbc2 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -116,7 +116,7 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i) fingering->set_property ("script-priority", scm_from_int (priority)); - if (!is_direction (fingering->get_property_data (ly_symbol2scm ("direction")))) + if (!is_direction (fingering->get_property_data ("direction"))) { if (d) fingering->set_property ("direction", scm_from_int (d)); diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 703f0055e8..707f4c118a 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -101,7 +101,7 @@ Grob::internal_set_property (SCM sym, SCM v) //#define PROFILE_PROPERTY_ACCESSES SCM -Grob::get_property_data (SCM sym) const +Grob::internal_get_property_data (SCM sym) const { #ifndef NDEBUG if (profile_property_accesses) diff --git a/lily/grob.cc b/lily/grob.cc index b3d117e3f5..ecbaa74a57 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -61,9 +61,9 @@ Grob::Grob (SCM basicprops, if (scm_is_pair (meta)) interfaces_ = scm_cdr (scm_assq (ly_symbol2scm ("interfaces"), meta)); - if (get_property_data (ly_symbol2scm ("X-extent")) == SCM_EOL) + if (get_property_data ("X-extent") == SCM_EOL) set_property ("X-extent", Grob::stencil_width_proc); - if (get_property_data (ly_symbol2scm ("Y-extent")) == SCM_EOL) + if (get_property_data ("Y-extent") == SCM_EOL) set_property ("Y-extent", Grob::stencil_height_proc); } @@ -293,7 +293,7 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end) off = *dim_cache_[Y_AXIS].offset_; else { - SCM proc = get_property_data (ly_symbol2scm ("Y-offset")); + SCM proc = get_property_data ("Y-offset"); dim_cache_[Y_AXIS].offset_ = new Real (0.0); off = robust_scm2double (call_pure_function (proc, diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 16b0c3f545..5eb433921a 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -78,7 +78,7 @@ public: /* Properties */ SCM get_property_alist_chain (SCM) const; SCM internal_get_property (SCM symbol) const; - SCM get_property_data (SCM symbol) const; + SCM internal_get_property_data (SCM symbol) const; SCM internal_get_object (SCM symbol) const; void internal_set_object (SCM sym, SCM val); void internal_del_property (SCM symbol); diff --git a/lily/include/lily-guile-macros.hh b/lily/include/lily-guile-macros.hh index 87ceb88a7c..d349cdb7c9 100644 --- a/lily/include/lily-guile-macros.hh +++ b/lily/include/lily-guile-macros.hh @@ -163,6 +163,7 @@ ly_add_function_documentation (SCM proc, char const *fname, VAR, ARGLIST, DOCSTRING) #define get_property(x) internal_get_property (ly_symbol2scm (x)) +#define get_property_data(x) internal_get_property_data (ly_symbol2scm (x)) #define get_object(x) internal_get_object (ly_symbol2scm (x)) #define set_object(x, y) internal_set_object (ly_symbol2scm (x), y) #define del_property(x) internal_del_property (ly_symbol2scm (x)) diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index baf353aa83..3682618ec9 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -64,8 +64,8 @@ Mark_engraver::acknowledge_break_aligned (Grob_info inf) Grob *s = inf.grob (); if (text_ && !text_->get_parent (X_AXIS) - && (text_->get_property_data (ly_symbol2scm ("break-align-symbol")) - == s->get_property_data (ly_symbol2scm ("break-align-symbol"))) + && (text_->get_property_data ("break-align-symbol") + == s->get_property_data ("break-align-symbol")) && Axis_group_interface::has_interface (s)) { /* diff --git a/lily/melody-engraver.cc b/lily/melody-engraver.cc index 01fb89e4ac..f968eae321 100644 --- a/lily/melody-engraver.cc +++ b/lily/melody-engraver.cc @@ -44,7 +44,7 @@ void Melody_engraver::stop_translation_timestep () { if (stem_ - && !is_direction (stem_->get_property_data (ly_symbol2scm ("neutral-direction")))) + && !is_direction (stem_->get_property_data ("neutral-direction"))) { extract_grob_set (stem_, "rests", rests); if (rests.size ()) diff --git a/lily/script-column.cc b/lily/script-column.cc index a50f794961..36ebc6971c 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -64,7 +64,7 @@ Script_column::row_before_line_breaking (SCM smob) { affect_all_grobs.push_back (sc); } - else if (sc->get_property_data (ly_symbol2scm ("Y-offset")) != + else if (sc->get_property_data ("Y-offset") != Side_position_interface::x_aligned_side_proc) { head_scripts_map[sc->get_parent (Y_AXIS)].push_back (sc); @@ -100,7 +100,7 @@ Script_column::before_line_breaking (SCM smob) /* Don't want to consider scripts horizontally next to notes. */ - if (sc->get_property_data (ly_symbol2scm ("X-offset")) != + if (sc->get_property_data ("X-offset") != Side_position_interface::x_aligned_side_proc) staff_sided.push_back (sc); } diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index d5bd961887..8adc406227 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -289,7 +289,7 @@ Tie_formatting_problem::from_ties (vector const &ties) { Tie_specification spec; - if (scm_is_number (ties[i]->get_property_data (ly_symbol2scm ("direction")))) + if (scm_is_number (ties[i]->get_property_data ("direction"))) { spec.manual_dir_ = to_dir (ties[i]->get_property ("direction")); spec.has_manual_dir_ = true; diff --git a/lily/tie.cc b/lily/tie.cc index b4b5206386..2cad6b302f 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -210,7 +210,7 @@ Tie::calc_control_points (SCM smob) (void) yparent->get_property ("positioning-done"); } - if (!scm_is_pair (me->get_property_data (ly_symbol2scm ("control-points")))) + if (!scm_is_pair (me->get_property_data ("control-points"))) { set_default_control_points (me); }