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.197 2001/05/14 05:28:46 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.198 2001/05/14 06:31:12 hubbe 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:848:    }else{    linep=0;    file="-";    }    fprintf(stderr,"- %s:%4ld: %s\n",file,(long)linep,s);    free(s);   }         #undef INIT_BLOCK - #define INIT_BLOCK(X) do { X->refs=1; X->flags=0; X->scope=0; }while(0) + #define INIT_BLOCK(X) do { \ +  X->refs=1; \ +  X->flags=0; \ +  X->scope=0; \ +  DO_IF_SECURITY( if(CURRENT_CREDS) \ +  add_ref(X->current_creds=CURRENT_CREDS); ) \ + }while(0)      #undef EXIT_BLOCK   #define EXIT_BLOCK(X) do { \    free_object(X->current_object); \    if(X->context.prog) free_program(X->context.prog); \    if(X->context.parent) free_object(X->context.parent); \    if(X->scope) free_pike_frame(X->scope); \ -  +  DO_IF_SECURITY( if(X->current_creds) free_object(X->current_creds); ) \    if(X->flags & PIKE_FRAME_MALLOCED_LOCALS) \    { \    free_svalues(X->locals,X->num_locals,BIT_MIXED); \    free((char *)(X->locals)); \    } \    DO_IF_DMALLOC( \    X->context.prog=0; \    X->context.parent=0; \    X->context.name=0; \    X->scope=0; \
pike.git/src/interpret.c:1444: Inside #if 1
   MEMMOVE(smsp,    fp->mark_sp_base,    sizeof(struct svalue **)*(Pike_mark_sp - fp->mark_sp_base));    fp->mark_sp_base-=freespace;    Pike_mark_sp-=freespace;    }   #endif   }       -  - #ifdef PIKE_SECURITY - /* Magic trick */ - static -  - #else - #define mega_apply2 mega_apply - #endif -  - void mega_apply2(enum apply_type type, INT32 args, void *arg1, void *arg2) + void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    if(low_mega_apply(type, args, arg1, arg2))    {    eval_instruction(Pike_fp->pc);    low_return();    }   }    - #ifdef PIKE_SECURITY - static void restore_creds(struct object *creds) - { -  if(Pike_interpreter.current_creds) -  free_object(Pike_interpreter.current_creds); -  Pike_interpreter.current_creds = creds; - } +     - PMOD_EXPORT void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2) - { -  ONERROR tmp; -  if(Pike_interpreter.current_creds) -  add_ref(Pike_interpreter.current_creds); -  -  SET_ONERROR(tmp, restore_creds, Pike_interpreter.current_creds); -  mega_apply2(type, args, arg1, arg2); -  CALL_AND_UNSET_ONERROR(tmp); - } - #endif -  -  +    /* Put catch outside of eval_instruction, so    * the setjmp won't affect the optimization of    * eval_instruction    */   static int o_catch(unsigned char *pc)   {    JMP_BUF tmp;    struct svalue *expendible=Pike_fp->expendible;    int flags=Pike_fp->flags;