From a23f195c7527541f9b77bf6b1b3d8ccacb3c05d9 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:25:06 +0000 Subject: [PATCH] lilypond-1.3.74 --- lily/identifier.cc | 10 +++------- lily/lookup.cc | 22 +++------------------- lily/multi-measure-rest-engraver.cc | 1 - lily/paper-def.cc | 5 +++-- lily/separation-item.cc | 4 ++-- lily/spaceable-element.cc | 8 ++++---- 6 files changed, 15 insertions(+), 35 deletions(-) diff --git a/lily/identifier.cc b/lily/identifier.cc index 41b5e049f9..d3d0e7221b 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -22,18 +22,19 @@ IMPLEMENT_UNSMOB(Identifier, identifier); IMPLEMENT_SMOBS(Identifier); +IMPLEMENT_DEFAULT_EQUAL_P(Identifier); Identifier::Identifier (int code) { - self_scm_ = SCM_EOL; token_code_i_ = code; accessed_b_ = 0; + smobify_self (); } Identifier::Identifier (Identifier const&s) : Input (s) { - self_scm_ = SCM_EOL; + smobify_self (); token_code_i_ = s.token_code_i_; accessed_b_ = s.accessed_b_; } @@ -173,8 +174,3 @@ Identifier::mark_smob (SCM s) -void -Identifier::do_smobify_self () -{ - -} diff --git a/lily/lookup.cc b/lily/lookup.cc index 4b7a9bdc53..a6c24eddd3 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -34,16 +34,12 @@ Lookup::Lookup () { afm_l_ = 0; - self_scm_ = SCM_EOL; - smobify_self (); } Lookup::Lookup (Lookup const& s) { font_name_ = s.font_name_; - self_scm_ = SCM_EOL; afm_l_ = 0; - smobify_self (); } SCM @@ -59,28 +55,16 @@ Lookup::print_smob (SCM s, SCM p, scm_print_state*) return 1; } -SCM -Lookup::equal_p (SCM a , SCM b) -{ - return a == b ? SCM_BOOL_T : SCM_BOOL_F; -} - -void -Lookup::do_smobify_self () -{ - -} IMPLEMENT_UNSMOB(Lookup, lookup); -IMPLEMENT_SMOBS(Lookup); +IMPLEMENT_SIMPLE_SMOBS(Lookup); +IMPLEMENT_DEFAULT_EQUAL_P(Lookup); SCM Lookup::make_lookup () { Lookup * l = new Lookup; - SCM ls = l->self_scm_; - scm_unprotect_object (ls); - return ls; + return l->smobbed_self(); } diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index d6a34e3268..c5d75d3a9f 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -155,7 +155,6 @@ Multi_measure_rest_engraver::do_post_move_processing () { Moment now (now_mom ()); - SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); diff --git a/lily/paper-def.cc b/lily/paper-def.cc index d90d5b305b..698daf4585 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -87,9 +87,10 @@ Paper_def::line_dimensions_int (int n) const } void -Paper_def::set_lookup (int i, Lookup*l) +Paper_def::set_lookup (int i, SCM l) { - lookup_alist_ = scm_assq_set_x(lookup_alist_, gh_int2scm (i), l->self_scm_); + assert (unsmob_lookup (l)); + lookup_alist_ = scm_assq_set_x(lookup_alist_, gh_int2scm (i), l); } diff --git a/lily/separation-item.cc b/lily/separation-item.cc index 7613471c7f..d740483ac8 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -38,9 +38,9 @@ Separation_item::my_width (Score_element *me) for (SCM s = me->get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) { SCM elt = gh_car (s); - if (!SMOB_IS_TYPE_B(Score_element, elt)) + if (!unsmob_element (elt)) continue; - + Item *il = dynamic_cast (unsmob_element (elt)); if (pc != il->column_l ()) { diff --git a/lily/spaceable-element.cc b/lily/spaceable-element.cc index 6bc4c1893f..b11f984218 100644 --- a/lily/spaceable-element.cc +++ b/lily/spaceable-element.cc @@ -27,7 +27,7 @@ Spaceable_element::add_rod (Score_element *me , Score_element * p, Real d) for (SCM s = mins; gh_pair_p (s); s = gh_cdr (s)) { SCM dist = gh_car (s); - if (gh_car (dist) == p->self_scm_) + if (gh_car (dist) == p->self_scm ()) { gh_set_cdr_x (dist, scm_max (gh_cdr (dist), newdist)); @@ -35,7 +35,7 @@ Spaceable_element::add_rod (Score_element *me , Score_element * p, Real d) } } - mins = gh_cons (gh_cons (p->self_scm_, newdist), mins); + mins = gh_cons (gh_cons (p->self_scm (), newdist), mins); me->set_elt_property ("minimum-distances", mins); } @@ -47,7 +47,7 @@ Spaceable_element::add_spring (Score_element*me, Score_element * p, Real d, Real for (SCM s = mins; gh_pair_p (s); s = gh_cdr (s)) { SCM dist = gh_car (s); - if (gh_car (dist) == p->self_scm_) + if (gh_car (dist) == p->self_scm ()) { programming_error("already have that spring"); return ; @@ -55,7 +55,7 @@ Spaceable_element::add_spring (Score_element*me, Score_element * p, Real d, Real } SCM newstrength= gh_double2scm (strength); - mins = gh_cons (gh_cons (p->self_scm_, gh_cons (newdist, newstrength)), mins); + mins = gh_cons (gh_cons (p->self_scm (), gh_cons (newdist, newstrength)), mins); me->set_elt_property ("ideal-distances", mins); } -- 2.39.5