X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fduration-scheme.cc;h=f62bba582a40ca02bcd7987e45e50ee2c31411a0;hb=7208189546b5932480e268e805e81e468fcd30e5;hp=4b8c4605c0e19e40c984c4b1e4fe424a7b112d0c;hpb=16cb456cabf477f6d398ff731aa0f10b60913394;p=lilypond.git diff --git a/lily/duration-scheme.cc b/lily/duration-scheme.cc index 4b8c4605c0..f62bba582a 100644 --- a/lily/duration-scheme.cc +++ b/lily/duration-scheme.cc @@ -27,12 +27,12 @@ LY_DEFINE (ly_duration_less_p, "ly:durationduration_log ()); } @@ -100,7 +98,7 @@ LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count", 1, 0, 0, (SCM dur), "Extract the dot count from @var{dur}") { - SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration"); + LY_ASSERT_SMOB (Duration, dur, 1); return scm_from_int (unsmob_duration (dur)->dot_count ()); } @@ -108,7 +106,7 @@ LY_DEFINE (ly_intlog2, "ly:intlog2", 1, 0, 0, (SCM d), "The 2-logarithm of 1/@var{d}.") { - SCM_ASSERT_TYPE (scm_is_number (d), d, SCM_ARG1, __FUNCTION__, "integer"); + LY_ASSERT_TYPE (scm_is_number, d, 1); int log = intlog2 (scm_to_int (d)); return scm_from_int (log); } @@ -117,15 +115,15 @@ LY_DEFINE (ly_duration_length, "ly:duration-length", 1, 0, 0, (SCM dur), "The length of the duration as a Moment.") { - SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration"); + LY_ASSERT_SMOB (Duration, dur, 1); return Moment (unsmob_duration (dur)->get_length ()).smobbed_copy (); } -LY_DEFINE (ly_duration2string, "ly:duration->string", +LY_DEFINE (ly_duration_2_string, "ly:duration->string", 1, 0, 0, (SCM dur), "Convert @var{dur} to string.") { - SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration"); + LY_ASSERT_SMOB (Duration, dur, 1); return ly_string2scm (unsmob_duration (dur)->to_string ()); } @@ -133,7 +131,7 @@ LY_DEFINE (ly_duration_factor, "ly:duration-factor", 1, 0, 0, (SCM dur), "Extract the compression factor from @var{dur}. Return as a pair.") { - SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration"); + LY_ASSERT_SMOB (Duration, dur, 1); Rational r = unsmob_duration (dur)->factor (); return scm_cons (scm_from_int (r.num ()), scm_from_int (r.den ())); }