This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: passing integers to c functions



On 16 Mar 1999, James Dean Palmer wrote:
> SCM 
> foo (SCM x)
> {
>   SCM_ASSERT (SCM_INUMP (x), x,  SCM_ARG1, "foo");
>   [ real code ... ]
> }
> 

I would use gh_number_p() instead of SCM_INUMP and gh_scm2int() to
convert. The problem is that Guile automatically converts between
different number representations, the gh_number stuff will take care of
that for you.

Havoc