pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2000-10-26
2000-10-26 15:05:30 by Mirar (Pontus Hagland) <pike@sort.mirar.org>
589cf7f7ff31c7ca52d035d9587657b8e0b7d2e2 (
19
lines) (+
17
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
fixed bignum bug and autoconversion in enumerate
Rev: src/builtin_functions.c:1.316
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
315
2000/10/
13
19
:
39
:
37
hubbe
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
316
2000/10/
26
15
:
05
:
30
mirar
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
5495:
d->item[i].u.integer=start; d->item[i].type=T_INT; d->item[i].subtype=NUMBER_NUMBER;
+
#ifdef AUTO_BIGNUM
+
if ((step>0 && start+step<start) ||
+
(step<0 && start+step>start)) /* overflow */
+
{
+
pop_stack();
+
push_int(n);
+
push_int(step);
+
convert_stack_top_to_bignum();
+
push_int(start);
+
convert_stack_top_to_bignum();
+
f_enumerate(3);
+
return;
+
}
+
#endif
start+=step; } }
5556:
} } pop_stack();
-
stack_pop_n_elems_keep_top(
4
);
+
stack_pop_n_elems_keep_top(
args
);
} }