]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.60
authorfred <fred>
Tue, 26 Mar 2002 23:23:00 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:00 +0000 (23:23 +0000)
lily/paper-column.cc
lily/scm-hash.cc
lily/spacing-engraver.cc
lily/timing-translator.cc
stepmake/bin/package-diff.py
stepmake/bin/packagepython.py

index d38687e4f1e24b3a93208ed67cc7781ea6df97cb..5ab553257f9e028413abaab825d2769ec8bfc6b5 100644 (file)
@@ -97,8 +97,7 @@ Paper_column::column_l () const
 Paper_column::Paper_column (Moment w)
   : Item (SCM_EOL)             // guh.?
 {
-  SCM when = (new Moment (w))->smobify_self ();
-  scm_unprotect_object (when);
+  SCM when = smobify (new Moment (w));
   set_elt_property ("when", when);
 
   Axis_group_interface (this).set_interface ();
index 8a2094b86ee7508b246f70f70417fbf0981bb6ed..98c430b3ebe7a3a3e9b788bf882f74016b40a241 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 
 #include "scm-hash.hh"
-#include "hash-table-iter.hh"
+
 
 
 Scheme_hash_table::Scheme_hash_table ()
@@ -97,7 +97,6 @@ void
 Scheme_hash_table::set (SCM k, SCM v)
 {
   (*this)[k] = v;
-  scm_unprotect_object (v);
 }
 
 // UGH. 
index 5e05094bdb132104b7e0da51841b7037519b947a..8146b7267678e57d4d3c62e8199d18d5314076c2 100644 (file)
@@ -97,12 +97,9 @@ Spacing_engraver::do_pre_move_processing ()
   Paper_column * sc
     = dynamic_cast<Paper_column*> (get_staff_info ().musical_pcol_l ());
 
-  SCM sh = (new Moment (shortest_playing))->smobify_self ();
-  SCM st = (new Moment (starter))->smobify_self ();
+  SCM sh = smobify (new Moment (shortest_playing));
+  SCM st = smobify (new Moment (starter));
 
-  scm_unprotect_object (st);
-  scm_unprotect_object (sh);
-  
   sc->set_elt_property ("shortest-playing-duration", sh);  
   sc->set_elt_property ("shortest-starter-duration", st);
 }
index 9cec28f42bcae3d1553a6253e1253ca06630f984..74efa874af0df6255f9fea7bb21fe07f4c2dd6fa 100644 (file)
@@ -79,7 +79,7 @@ Timing_translator::do_process_music()
                                  measure_position ().str ()));
              // resync
              daddy_trans_l_->set_property("measurePosition",
-                                          (new Moment)->smobify_self ());
+                                          smobify (new Moment));
 
            }
        }
@@ -124,12 +124,9 @@ Timing_translator::do_creation_processing()
 {
   daddy_trans_l_->set_property ("timing" , SCM_BOOL_T);  
   daddy_trans_l_->set_property ("currentBarNumber" , gh_int2scm (1));
-  daddy_trans_l_->set_property("measurePosition",
-                              (new Moment)->smobify_self());
-  daddy_trans_l_->set_property ("oneBeat",
-                               (new Moment (1,4))->smobify_self ());
-  daddy_trans_l_->set_property("measureLength",
-                              (new Moment (1))->smobify_self());
+  daddy_trans_l_->set_property ("measurePosition", smobify (new Moment));
+  daddy_trans_l_->set_property ("oneBeat", smobify (new Moment (1,4)));
+  daddy_trans_l_->set_property ("measureLength", smobify (new Moment (1)));
 }
 
 Moment
@@ -160,10 +157,8 @@ Timing_translator::set_time_signature (int l, int o)
 {
   Moment one_beat = Moment (1)/Moment (o);
   Moment len = Moment (l) * one_beat;
-  daddy_trans_l_->set_property ("measureLength",
-                               (new Moment (len))->smobify_self ());
-  daddy_trans_l_->set_property ("beatLength",
-                               (new Moment (one_beat))->smobify_self ());
+  daddy_trans_l_->set_property ("measureLength", smobify (new Moment (len)));
+  daddy_trans_l_->set_property ("beatLength", smobify (new Moment (one_beat)));
 }
 
 Timing_translator::Timing_translator()
@@ -219,7 +214,7 @@ Timing_translator::do_post_move_processing()
   else
     {
       measposp = new Moment;
-      daddy_trans_l_->set_property ("measurePosition", measposp->smobify_self ());
+      daddy_trans_l_->set_property ("measurePosition", smobify (measposp));
     }
   
   *measposp += dt;
index b1fe324985e0d8963afcdbda1965a1d14fc11c34..98fcbfe64b8a530b059c292575b36f5400f6c8e2 100644 (file)
@@ -257,7 +257,7 @@ if to_diff == from_diff:
        elif to_src:
              to_diff = to_diff + '.src'
        else:
-             sys.stderr.write (name + ': nothing to do: to == from == ' + from_diff + '\n')
+             sys.stderr.write (patch_name + ': nothing to do: to == from = ' + from_diff + '\n')
              sys.exit (1)
 
 if not patch_name:
index 1950f569354970c830d58cdd5a510d99aa6a9317..10ab9a806593d90a885d4bc478495ad335961e9c 100755 (executable)
@@ -121,10 +121,9 @@ def version_tuple_to_str(tup):
 
 def version_str_to_tuple(str):
        t = string.split(str, '.')
-       try:
-               mypatch = t[3]
-       except IndexError:
-               mypatch = ''
+       mypatch = ''
+       if len (t) >= 4:
+               mypatch = string.join (t[3:], '.')
        return (string.atoi(t[0]), string.atoi(t[1]), string.atoi(t[2]), mypatch)
 
 def version_compare (tupl, tupr):