guile-devel
[Top][All Lists]
Advanced

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

Re: scm_integer_p and scm_num2int mismatch


From: Jan Nieuwenhuizen
Subject: Re: scm_integer_p and scm_num2int mismatch
Date: 08 Oct 2001 00:10:39 +0200

Marius Vollmer <address@hidden> writes:

> No, it should be changed to
> 
>     if (SCM_NFALSEP (scm_integer_p (s)))
>       {
>         scm_display (s, scm_current_output_port ());
>         scm_newline (scm_current_output_port ());
>       }

:-)
The printf was an example and check in one, of course.  I need an
assignment to a C int.

> But more seriously, you need to insert a call to scm_inexact_to_exact
> when you want to deal with reals as well as integers.

Ok, so checking for scm_integer_p and then calling gh_num2int is from
now on allowed to barf (when the real happens to be 1.0, eg).

Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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