guile-user
[Top][All Lists]
Advanced

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

Re: scm_num2long


From: Dirk Herrmann
Subject: Re: scm_num2long
Date: Thu, 12 Apr 2001 14:41:41 +0200 (MEST)

On Thu, 12 Apr 2001, Bill Schottstaedt wrote:

> This might come in handy:
> 
>     pos_char="no"
>     AC_MSG_CHECKING([for char *pos arg to scm_num2long])
>     AC_EGREP_HEADER([extern long scm_num2long.+char.+char],
>                     libguile/numbers.h,
>                     [AC_DEFINE(HAVE_SCM_NUM2LONG_WITH_CHAR_ARG2)
>                      pos_char="yes"])
>     AC_MSG_RESULT($pos_char)
> 
> (also applies to scm_num2long_long)

Hmmm.  I am the one who changed the interface of scm_num2*:

 old:  scm_num2* (SCM num, char* pos, char* caller);
 new:  scm_num2* (SCM num, unsigned long int pos, char* caller);

The pos paramter always had to be an unsigned long int, but with the old
interface, this value was passed as a char*, and thus had to be cast to a
char* by the caller, and cast back by the scm_num2* functions.  IMO, it is
a sensible change, but it should not cause people to use conditional
compilation like you propose with your macro above.

I'd rather re-introduce the old interface, deprecate it and introduce new
functions scm_number2* with the clean interface.

Best regards,
Dirk Herrmann




reply via email to

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