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.353 2004/09/18 20:50:50 nilsson Exp $ + || $Id: interpret.c,v 1.354 2004/09/22 13:10:30 mast 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:2418:    {    push_int(0);    }   #ifdef PIKE_DEBUG    if(Pike_sp < (expected_stack + Pike_interpreter.evaluator_stack))    Pike_fatal("Stack underflow!\n");   #endif    }   }    + PMOD_EXPORT void safe_apply_svalue(struct svalue *s, int args, int handle_errors) + { +  JMP_BUF recovery; +  free_svalue(& throw_value); +  throw_value.type=T_INT; +  if(SETJMP_SP(recovery, args)) +  { +  if(handle_errors) call_handle_error(); +  push_int(0); +  }else{ +  apply_svalue (s, args); +  } +  UNSETJMP(recovery); + } +    /* Apply function @[fun] in parent @[depth] levels up with @[args] arguments.    */   PMOD_EXPORT void apply_external(int depth, int fun, INT32 args)   {    struct external_variable_context loc;       loc.o = Pike_fp->current_object;    loc.parent_identifier = Pike_fp->fun;    if (loc.o->prog)    loc.inherit = INHERIT_FROM_INT(loc.o->prog, loc.parent_identifier);