pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || 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"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin_functions.c:3952:    yywarning ("%S", s);    free_string (s);    }    free_svalue(&thrown);    } else {    INT16 lfun;    struct object *replace_obj;    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);       push_object(replace_obj);    if (replace_obj->prog &&    ((lfun = FIND_LFUN(replace_obj->prog, LFUN_CALL)) != -1)) {    Pike_sp[-1].subtype = lfun;    Pike_sp[-1].type = PIKE_T_FUNCTION;    ADD_NODE_REF2(*arg0,    ret = mkapplynode(mkconstantsvaluenode(Pike_sp-1),