pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.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: interpret.c,v 1.394 2008/04/12 16:18:17 grubba Exp $ + || $Id: interpret.c,v 1.395 2008/04/14 16:33:32 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"
pike.git/src/interpret.c:2400:    Pike_compiler->new_program->num_identifier_references--;    Pike_compiler->new_program->num_identifiers--;    }       assert (new_frame == Pike_fp);    LOW_POP_PIKE_FRAME (new_frame);       return ret;   }    - PMOD_EXPORT void safe_apply_low2(struct object *o, int fun, int args, + PMOD_EXPORT int safe_apply_low2(struct object *o, int fun, int args,    const char *fun_name)   {    JMP_BUF recovery; -  +  int ret = 0;       free_svalue(& throw_value);    mark_free_svalue (&throw_value);    if(SETJMP_SP(recovery, args))    {    if(fun_name) call_handle_error();    push_int(0); -  +  ret = 0;    }else{    if (fun >= 0) {    apply_low(o,fun,args);    } else if (fun_name) {    Pike_error("Cannot call unknown function \"%s\".\n", fun_name);    } else {    pop_n_elems(args);    push_int(0);    } -  +  ret = 1;    }    UNSETJMP(recovery); -  +  return ret;   }    - PMOD_EXPORT void safe_apply_low(struct object *o, int fun, int args) + PMOD_EXPORT int safe_apply_low(struct object *o, int fun, int args)   { -  safe_apply_low2(o, fun, args, "Unknown function."); +  return safe_apply_low2(o, fun, args, "Unknown function.");   }    - PMOD_EXPORT void safe_apply(struct object *o, const char *fun, INT32 args) + PMOD_EXPORT int safe_apply(struct object *o, const char *fun, INT32 args)   {    int id;   #ifdef PIKE_DEBUG    if(!o->prog) Pike_fatal("Apply safe on destructed object.\n");   #endif    id = find_identifier(fun, o->prog); -  safe_apply_low2(o, id, args, fun); +  return safe_apply_low2(o, id, args, fun);   }      /* Returns nonzero if the function was called in some handler. */   PMOD_EXPORT int low_unsafe_apply_handler(const char *fun,    struct object *handler,    struct object *compat,    INT32 args)   {    int i;   #if 0