pike.git / src / interpret.h

version» Context lines:

pike.git/src/interpret.h: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.   \*/      /* -  * $Id: interpret.h,v 1.55 2000/08/03 12:36:30 grubba Exp $ +  * $Id: interpret.h,v 1.56 2000/08/03 12:46:29 grubba Exp $    */   #ifndef INTERPRET_H   #define INTERPRET_H      #include "global.h"   #include "program.h"   #include "error.h"      struct Pike_interpreter {    /* Swapped variables */
pike.git/src/interpret.h:87:   #define check_c_stack(X) do { \    long x_= ((char *)&x_) + STACK_DIRECTION * (X) - Pike_interpreter.stack_top ; \    x_*=STACK_DIRECTION; \    if(x_>0) \    low_error("C stack overflow.\n"); \    }while(0)         #define pop_stack() do{ free_svalue(--Pike_sp); debug_check_stack(); }while(0)    + #ifdef __ECL + #define MAYBE_CAST_TO_LONG(X) (X) + #else /* !__ECL */ + #define MAYBE_CAST_TO_LONG(X) ((long)(X)) + #endif /* __ECL */ +    #define pop_n_elems(X) \    do { ptrdiff_t x_=(X); if(x_) { \    check__positive(x_, ("Popping negative number of args.... (%ld) \n", \ -  (long)x_)); \ +  MAYBE_CAST_TO_LONG(x_))); \    Pike_sp -= x_; debug_check_stack(); \    free_svalues(Pike_sp, x_, BIT_MIXED); \    } } while (0)      #define stack_pop_n_elems_keep_top(X) \    do { struct svalue s=Pike_sp[-1]; Pike_sp[-1]=Pike_sp[-1-(X)]; Pike_sp[-1-(X)]=s; \    pop_n_elems(X); } while (0)      #define push_program(P) do{ struct program *_=(P); debug_malloc_touch(_); Pike_sp->u.program=_; Pike_sp++->type=PIKE_T_PROGRAM; }while(0)   #define push_int(I) do{ INT32 _=(I); Pike_sp->u.integer=_;Pike_sp->type=PIKE_T_INT;Pike_sp++->subtype=NUMBER_NUMBER; }while(0)