pike.git / src / pike_types.h

version» Context lines:

pike.git/src/pike_types.h:3:   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      #ifndef PIKE_TYPES_H   #define PIKE_TYPES_H      #include "svalue.h"   #include "stralloc.h"   #include "string_builder.h" + #include "mapping.h"      #define PIKE_TYPE_STACK_SIZE 100000      #ifdef PIKE_DEBUG   void TYPE_STACK_DEBUG(const char *fun);   #else /* !PIKE_DEBUG */   #define TYPE_STACK_DEBUG(X)   #endif /* PIKE_DEBUG */      /*
pike.git/src/pike_types.h:185:    */   #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;    INT32 argno;   };    - #define LOW_INIT_CALL_STATE(CS, ARGNO) do { \ + #define LOW_INIT_CALL_STATE(CS, ARGNO, MAP) do { \ +  if (((CS).m = (MAP))) { \ +  add_ref((CS).m); \ +  } \    (CS).argno = (ARGNO); \    } while (0)    - #define INIT_CALL_STATE(CS) LOW_INIT_CALL_STATE(CS, 0) + #define INIT_CALL_STATE(CS) LOW_INIT_CALL_STATE(CS, 0, NULL)    - #define FREE_CALL_STATE(CS) + #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; +  } +  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) \    safe_add_ref(D = (struct pike_type *)debug_malloc_pass(S))   #define CONSTTYPE(X) make_pike_type(X)