pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:252:
} else if(SUBTYPEOF(sp[-1]) == NUMBER_UNDEFINED) Pike_error("Cannot cast this object to int.\n"); } break; case T_FLOAT: { FLOAT_TYPE f = sp[-1].u.float_number;
-
if (
-
#ifdef
HAVE
_ISINF
-
isinf
(f) ||
-
#endif
-
#ifdef
HAVE
_ISNAN
-
isnan
(f)
||
-
#endif
-
0
)
+
if (
PIKE
_ISINF(f) ||
PIKE
_ISNAN(f) )
Pike_error("Can't cast infinites or NaN to int.\n"); if (UNLIKELY(f > MAX_INT_TYPE || f < MIN_INT_TYPE)) { convert_stack_top_to_bignum(); } else { SET_SVAL(sp[-1], T_INT, NUMBER_NUMBER, integer, f); } break; }