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.161 2000/08/10 08:35:24 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.162 2000/08/10 08:38:20 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:668:      #else   #define mega_apply2 mega_apply   #endif         PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void *arg2)   {    struct object *o;    struct pike_frame *scope=0; -  int fun, tailrecurse=-1; +  int tailrecurse=-1; +  ptrdiff_t fun;    struct svalue *save_sp=Pike_sp-args;      #ifdef PROFILING   #ifdef HAVE_GETHRTIME    long long children_base = Pike_interpreter.accounted_time;    long long start_time = gethrtime() - Pike_interpreter.time_base;    unsigned INT32 self_time_base;   #if 0   #ifdef PIKE_DEBUG    if(start_time < 0)
pike.git/src/interpret.c:846: Inside #if defined(PIKE_DEBUG)
   if(fun < 0 || fun >= NUM_LFUNS)    fatal("Apply lfun on illegal value!\n");   #endif    if(!o->prog)    PIKE_ERROR("destructed object", "Apply on destructed object.\n", Pike_sp, args);    fun=FIND_LFUN(o->prog,fun);    goto apply_low;          case APPLY_LOW: -  o=(struct object *)arg1; -  fun=(long)arg2; +  o = (struct object *)arg1; +  fun = (ptrdiff_t)arg2;       apply_low:    scope=0;    apply_low_with_scope:    {    struct program *p;    struct reference *ref;    struct pike_frame *new_frame;    struct identifier *function;   
pike.git/src/interpret.c:891: Inside #if defined(PIKE_SECURITY)
   ("Function call permission denied.\n"));       if(!CHECK_DATA_SECURITY(o, SECURITY_BIT_NOT_SETUID))    SET_CURRENT_CREDS(o->prot);   #endif         #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. %ld >= %d\n", +  (long)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