pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.241 2001/08/15 09:26:32 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.242 2001/08/15 20:55:51 mast Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:1845:    safe_apply_low2(o, find_identifier(fun, o->prog), args, 1);   }      PMOD_EXPORT void safe_apply_handler(const char *fun,    struct object *handler,    struct object *compat,    INT32 args)   {    int i;   #if 0 -  fprintf(stderr, "safe_apply_handler(\"%s\", 0x%08p, 0x%08p, %d\n", +  fprintf(stderr, "safe_apply_handler(\"%s\", 0x%08p, 0x%08p, %d)\n",    fun, handler, compat, args);   #endif /* 0 */       free_svalue(&throw_value);    throw_value.type = T_INT;       if (handler && handler->prog &&    (i = find_identifier(fun, handler->prog)) != -1) {    safe_apply_low2(handler, i, args, 0);    } else if (compat && compat->prog &&    (i = find_identifier(fun, compat->prog)) != -1) {    safe_apply_low2(compat, i, args, 0);    } else {    struct object *master_obj = master(); -  i = find_identifier(fun, master_obj->prog); +  if ((i = find_identifier(fun, master_obj->prog)) != -1)    safe_apply_low2(master_obj, i, args, 0); -  +  else { +  pop_n_elems(args); +  push_undefined();    } -  +  }    if (throw_value.type != T_STRING && throw_value.type != T_INT) {    free_svalue(&throw_value);    throw_value.type = T_INT;    }   }      PMOD_EXPORT void apply_lfun(struct object *o, int fun, int args)   {   #ifdef PIKE_DEBUG    if(fun < 0 || fun >= NUM_LFUNS)