problem with integer in extension

From: Sarah Officer <>
Date: Wed, 8 Nov 1995 15:40:35 -0700 (MST)


I am running STk-2.2.0 on LINUX & SUN4 platforms, and I have written an
extension that takes an integer for an argument.

  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

I would appreciate any help.


Sarah Officer
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