pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-06-29
2001-06-29 10:47:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>
cbd1f20d08a9bb85dd89be1b97e8e5442a6435ca (
11
lines) (+
7
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Now ensures correct evaluation order in optimize_replace().
Rev: src/builtin_functions.c:1.387
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
386
2001/06/29
02
:
14
:
56
hubbe
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
387
2001/06/29
10
:
47
:
37
grubba
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
3115:
} else { extern struct program *multi_string_replace_program; INT16 lfun;
-
struct object *replace_obj
=
-
clone_object(multi_string_replace_program,
-
eval_low(*arg1) + eval_low(*arg2))
;
+
struct object *replace_obj;
node *ret = NULL;
-
+
INT32 args = eval_low(*arg1); /* NOTE: Addition splitted to ensure */
+
args += eval_low(*arg2); /* correct evaluation order. */
-
+
replace_obj = clone_object(multi_string_replace_program, args);
+
push_object(replace_obj); if (replace_obj->prog && ((lfun = FIND_LFUN(replace_obj->prog, LFUN_CALL)) != -1)) {