pike.git / src / interpret.h

version» Context lines:

pike.git/src/interpret.h:710:   enum apply_type   {    APPLY_STACK, /* The function is the first argument */    APPLY_SVALUE, /* arg1 points to an svalue containing the function */    APPLY_SVALUE_STRICT, /* Like APPLY_SVALUE, but does not return values for void functions */    APPLY_LOW /* arg1 is the object pointer,(int)arg2 the function */   };      #define APPLY_MASTER(FUN,ARGS) \   do{ \ -  static int fun_, master_cnt=0; \ +  const char* _fun_ = (FUN); \ +  int _args_ = (ARGS); \ +  static int id_, master_cnt=0; \    struct object *master_ob=master(); \    if(master_cnt != master_ob->prog->id) \    { \ -  fun_=find_identifier(FUN,master_ob->prog); \ +  id_=find_identifier(_fun_,master_ob->prog); \    master_cnt = master_ob->prog->id; \    } \ -  if (fun_ >= 0) { \ -  apply_low(master_ob, fun_, ARGS); \ +  if (id_ >= 0) { \ +  apply_low(master_ob, id_, _args_); \    } else { \ -  Pike_error("Cannot call undefined function \"%s\" in master.\n", FUN); \ +  Pike_error("Cannot call undefined function \"%s\" in master.\n", _fun_); \    } \   }while(0)      #define SAFE_APPLY_MASTER(FUN,ARGS) \   do{ \ -  static int fun_, master_cnt=0; \ +  const char* _fun_ = (FUN); \ +  int _args_ = (ARGS); \ +  static int id_, master_cnt=0; \    struct object *master_ob=master(); \    if(master_cnt != master_ob->prog->id) \    { \ -  fun_=find_identifier(FUN,master_ob->prog); \ +  id_=find_identifier(_fun_,master_ob->prog); \    master_cnt = master_ob->prog->id; \    } \ -  safe_apply_low2(master_ob, fun_, ARGS, FUN); \ +  safe_apply_low2(master_ob, id_, _args_, _fun_); \   }while(0)      #define SAFE_APPLY_HANDLER(FUN, HANDLER, COMPAT, ARGS) do { \    static int h_fun_=-1, h_id_=0; \    static int c_fun_=-1, c_fun_id_=0; \    struct object *h_=(HANDLER), *c_=(COMPAT); \    if (h_ && h_->prog) { \    if (h_->prog->id != h_id_) { \    h_fun_ = find_identifier(fun, h_->prog); \    h_id_ = h_->prog->id; \