problem with integer in extension
Hello:
I am running STk-2.2.0 on LINUX & SUN4 platforms, and I have written an
extension that takes an integer for an argument.
PRIMITIVE seek(SCM val)
{
long cval;
cval = STk_integer_value(val); /* get the integer out */
if (cval == LONG_MIN) { /* offset not an int */
sprintf(buff, "val argument must be an integer");
STk_err(buff, val);
}
...
}
The routine works fine as long as val is less than 8388608. If it
is equal or greater than this value, I get the "val argument must be
an integer" error, even though (integer? 88388608) returns true. I
looked at STk_integer_value in number.c, and it seems like the correct
value should be returned for a number in this range regardless of whether
it is an integer or a bignum. I looked for the values of LONG_MIN on
both of my machines, and the value I am using doesn't begin to approach
it.
I would appreciate any help.
Thanks,
Sarah Officer
officers_at_aries.tucson.saic.com
Received on Wed Nov 08 1995 - 23:40:52 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST