pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2008-01-21
2008-01-21 11:44:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>
1759c4deb325f1121634f47db9ab9f45aefbb70f (
10
lines) (+
8
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Added some paranoia to optimize_replace().
Rev: src/builtin_functions.c:1.648
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: builtin_functions.c,v 1.
647
2008/01/
13
19
:
20
:
17
grubba Exp $
+
|| $Id: builtin_functions.c,v 1.
648
2008/01/
21
11
:
44
:
48
grubba Exp $
*/ #include "global.h"
3959:
node *ret = NULL; INT32 args; args = eval_low(*arg1, 1);
+
if (args != 1) return NULL;
if (arg2) {
-
args += eval_low(*arg2,1);
+
args += eval_low(*arg2,
1);
+
if (!args) {
+
/* eval_low() returned -1. */
+
return NULL;
}
-
+
}
replace_obj = clone_object(replace_compiler, args);