]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/duration.cc
(music_property_def): oops. SCM_UNDEFINED
[lilypond.git] / lily / duration.cc
index 87c6dcfd0c64782621582118c78db542aaff7ed6..6145731b4b1c94ee34573f1607e4af28eef1f073 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the LilyPond music typesetter
 
-  (c)  1997--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1997--2004 Jan Nieuwenhuizen <janneke@gnu.org>
            Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 */
@@ -69,19 +69,19 @@ Duration::get_length () const
 
 
 String
-Duration::string () const
+Duration::to_string () const
 {
   String s;
 
   if (durlog_ < 0  )
-    s = "log = "  + to_string (durlog_);
+    s = "log = "  + ::to_string (durlog_);
   else
-    s = to_string (1 << durlog_);
+    s = ::to_string (1 << durlog_);
   
-  s += to_string ('.', dots_);
+  s += ::to_string ('.', dots_);
   if (factor_ != Moment (Rational (1,1)))
     {
-      s += "*" + factor_.string ();
+      s += "*" + factor_.to_string ();
     }
   return s;
 }
@@ -102,7 +102,7 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *)
   Duration  *r = (Duration *) ly_cdr (s);
      
   scm_puts ("#<Duration ", port);
-  scm_display (scm_makfrom0str (r->string ().to_str0 ()), port);
+  scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port);
   scm_puts (" >", port);
   
   return 1;
@@ -180,7 +180,10 @@ LY_DEFINE(make_duration,
     num = gh_int2scm (1);
   
   if (den != SCM_UNDEFINED)
-    SCM_ASSERT_TYPE(gh_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
+    {
+      SCM_ASSERT_TYPE(gh_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
+      compress = true;
+    }
   else
     den = gh_int2scm (1);