pike.git / src / pike_types.h

version» Context lines:

pike.git/src/pike_types.h:191:   #define CALL_STRICT 0x0001 /* Strict checking. */   #define CALL_NOT_LAST_ARG 0x0002 /* This is not the last argument. */   #define CALL_WEAK_VOID 0x0008 /* Allow promotion of void to zero. */   #define CALL_ARG_LVALUE 0x0010 /* Argument is lvalue (sscanf). */   #define CALL_INHIBIT_WARNINGS 0x0020 /* Inhibit warnings. */   #define CALL_INVERTED_TYPES 0x0040 /* The fun and arg are inverted. */      struct call_state   {    struct mapping *m; +  struct pike_string *fun_name;    INT32 argno;   };    - #define LOW_INIT_CALL_STATE(CS, ARGNO, MAP) do { \ -  if (((CS).m = (MAP))) { \ -  add_ref((CS).m); \ -  } \ -  (CS).argno = (ARGNO); \ + #define LOW_INIT_CALL_STATE(CS, NAME, ARGNO, MAP) do { \ +  if (((CS).m = (MAP))) { \ +  add_ref((CS).m); \ +  } \ +  if (!((CS).fun_name = (NAME))) { \ +  (CS).fun_name = unknown_function_string; \ +  } \ +  add_ref((CS).fun_name); \ +  (CS).argno = (ARGNO); \    } while (0)    - #define INIT_CALL_STATE(CS) LOW_INIT_CALL_STATE(CS, 0, NULL) + #define INIT_CALL_STATE(CS, NAME) LOW_INIT_CALL_STATE(CS, NAME, 1, NULL)      #define FREE_CALL_STATE(CS) free_call_state(&(CS))      static inline void free_call_state(struct call_state *cs)   {    if (cs->m) {    free_mapping(cs->m);    cs->m = NULL;    } -  +  if (cs->fun_name) { +  free_string(cs->fun_name); +  cs->fun_name = NULL; +  }    cs->argno = 0;   }      /*    * soft_cast() flags    */   #define SOFT_WEAKER 0x0001 /* Soft cast to a weaker type. */      void debug_free_type(struct pike_type *t);   #define copy_pike_type(D, S) \