]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.74
authorfred <fred>
Tue, 26 Mar 2002 23:25:06 +0000 (23:25 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:25:06 +0000 (23:25 +0000)
lily/identifier.cc
lily/lookup.cc
lily/multi-measure-rest-engraver.cc
lily/paper-def.cc
lily/separation-item.cc
lily/spaceable-element.cc

index 41b5e049f958b330db1fdf99e6e8fb44b5b39fd6..d3d0e7221b7024d83614dc6b29aaab9c783070f7 100644 (file)
 
 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 ()
-{
-  
-}
index 4b7a9bdc534210762785df5bc958f378847e58c4..a6c24eddd35692b5f4f5b328090fd4d2806d00af 100644 (file)
 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();
 }
 
 
index d6a34e326866f05b14efcc701979e22250800554..c5d75d3a9f5ddc279748da445227d80d85effde1 100644 (file)
@@ -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);
   
index d90d5b305bc8eb37fea2894a781a88873ddb4d78..698daf4585f39c01089ca15f10203fe7492463ba 100644 (file)
@@ -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);
 }
 
 
index 7613471c7f66dc9a50b15b7da8951991f6c2b876..d740483ac8016287c4f8d7fc30c33740d829096b 100644 (file)
@@ -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<Item*> (unsmob_element (elt));
       if (pc != il->column_l ())
        {
index 6bc4c1893fd31866d6af70203de01832a43b8428..b11f9842184203c10f3f954037c9027982302513 100644 (file)
@@ -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);
 }