* numbers.c (scm_num2ulong): Check that a bignum is positive
authorMarius Vollmer <mvo@zagadka.de>
Thu, 15 Mar 2001 20:04:41 +0000 (20:04 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Thu, 15 Mar 2001 20:04:41 +0000 (20:04 +0000)
commitcaf08e652ee9bbb201d2152632d11d1f8ac0e1b3
tree8279d1a1653a51a99e8f4c5598520163de7a421e
parent5345cf7caed5bb1c2ce0772e35df5cf75b61dee1
* numbers.c (scm_num2ulong): Check that a bignum is positive
before looking at the magnitude.  Correctly check for overflow
during conversion.
(scm_num2long_long): Likewise.
(scm_num2ulong_long): New.
(ULONG_LONG_MAX): Define if not already defined.
* numbers.h: (scm_num2ulong_long): New prototype.
libguile/numbers.c
libguile/numbers.h