[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lily-guile updates and CG: "Scheme->C interface" section. (issue 491

From: n . puttock
Subject: Re: lily-guile updates and CG: "Scheme->C interface" section. (issue 4917044)
Date: Fri, 19 Aug 2011 20:20:12 +0000
File lily/ (right):
lily/ if (scm_is_integer (s))
On 2011/08/19 18:04:38, Carl wrote:

I think the old code here is correct, and the doc-string is wrong.

Both are correct; the only difference is when Guile raises an error.  In
Bertrand's version, it's at the top of the code; in current master, it's
in the block below when scm_to_int () is called.
File lily/include/lily-guile.hh (right):
lily/include/lily-guile.hh:96: //                       or scm_is_true
(scm_exact_p (x)) ?
Have you looked at the definition in the Guile repository

It's a low-level function which returns true if the SCM object isn't an
and is tagged as a fraction (I think this only happens if scm_divide ()
creates a fraction)
File lily/ (right):
lily/ return is_number_pair (p) ?
ly_scm2interval is deliberately sloppy; it's assumed the caller has made
sure the object is a number pair.  If we're unsure, we use
robust_scm2interval, which does the check then calls this function to
perform the conversion.  Adding this extra safety check will cause any
robust_scm2interval call on a valid number-pair to get two checks.
lily/ return is_number_pair (s) ?
see comment for ly_scm2interval

reply via email to

[Prev in Thread] Current Thread [Next in Thread]