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.126 1999/06/03 01:39:33 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.127 1999/09/06 10:47:15 grubba Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:609:    free_svalues(X->locals,X->num_locals,BIT_MIXED); \    free((char *)(X->locals)); \    } \   }while(0)      BLOCK_ALLOC(pike_frame,128)            #ifdef PIKE_SECURITY - static void restore_creds(struct object *creds) - { -  if(current_creds) free_object(current_creds); -  current_creds=creds; - } -  +    /* Magic trick */   static      #else   #define mega_apply2 mega_apply   #endif         void mega_apply2(enum apply_type type, INT32 args, void *arg1, void *arg2)   {
pike.git/src/interpret.c:829:    if(d_flag>2) do_debug();   #endif       p=o->prog;    if(!p)    PIKE_ERROR("destructed object->function",    "Cannot call functions in destructed objects.\n", sp, args);   #ifdef PIKE_DEBUG    if(fun>=(int)p->num_identifier_references)    { -  fprintf(stderr,"Function index out of range. %d >= %d\n",fun,(int)p->num_identifier_references); +  fprintf(stderr, "Function index out of range. %d >= %d\n", +  fun, (int)p->num_identifier_references);    fprintf(stderr,"########Program is:\n");    describe(p);    fprintf(stderr,"########Object is:\n");    describe(o);    fatal("Function index out of range.\n");    }   #endif       ref = p->identifier_references + fun;   #ifdef PIKE_DEBUG
pike.git/src/interpret.c:876: Inside #if defined(PIKE_DEBUG)
   new_frame->context.name ? new_frame->context.name->str : "NULL");    if(t_flag>19)    {    describe(new_frame->context.prog);    }    }   #endif         #ifdef PIKE_SECURITY -  CHECK_DATA_SECURITY_OR_ERROR(o, SECURITY_BIT_CALL, ("Function call permission denied.\n")); +  CHECK_DATA_SECURITY_OR_ERROR(o, SECURITY_BIT_CALL, +  ("Function call permission denied.\n"));       if(!CHECK_DATA_SECURITY(o, SECURITY_BIT_NOT_SETUID))    SET_CURRENT_CREDS(o->prot);   #endif         #ifdef PROFILING    function->num_calls++;   #endif   
pike.git/src/interpret.c:1105:    if(save_sp+1 > sp)    {    if(type != APPLY_SVALUE)    push_int(0);    }else{    if(t_flag>1) trace_return_value();    }   }      #ifdef PIKE_SECURITY + static void restore_creds(struct object *creds) + { +  if(current_creds) +  free_object(current_creds); +  current_creds = creds; + } +    void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    ONERROR tmp;    if(current_creds)    add_ref(current_creds);       SET_ONERROR(tmp, restore_creds, current_creds); -  mega_apply2(type,args,arg1,arg2); +  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)