pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:3840:   }            /******/      struct remap_state {    unsigned char map[0x40];    unsigned INT32 allocated;    struct mapping *markers[2]; +  struct mapping *state;   };      #ifdef PIKE_NULL_IS_SPECIAL   #define INIT_REMAP_STATE(REMAP) do { \    memset(&REMAP, 0, sizeof(struct remap_state)); \    REMAP.markers[0] = NULL; \    REMAP.markers[1] = NULL; \ -  +  REMAP.state = NULL; \    } while(0)   #else   #define INIT_REMAP_STATE(REMAP) do { \    memset(&REMAP, 0, sizeof(struct remap_state)); \    } while(0)   #endif   static inline void exit_remap_state(struct remap_state *remap)   {    if (remap && remap->markers[0]) {    free_mapping(remap->markers[0]);    remap->markers[0] = NULL;    }    if (remap && remap->markers[1]) {    free_mapping(remap->markers[1]);    remap->markers[1] = NULL;    } -  +  if (remap && remap->state) { +  free_mapping(remap->state); +  remap->state = NULL;    } -  + }   #define EXIT_REMAP_STATE(REMAP) exit_remap_state(&REMAP)      #ifdef PIKE_DEBUG   static void simple_describe_remap_state(struct remap_state *remap)   {    int i;    if (!remap) {    fprintf(stderr, "remap: NULL\n");    return;    }
pike.git/src/pike_types.cmod:3890:    }    }    if (remap->markers[0]) {    fprintf(stderr, "markers[0]:\n");    simple_describe_mapping(remap->markers[0]);    }    if (remap->markers[1]) {    fprintf(stderr, "markers[1]:\n");    simple_describe_mapping(remap->markers[1]);    } +  if (remap->state) { +  fprintf(stderr, "state:\n"); +  simple_describe_mapping(remap->state);    } -  + }   #else   #define simple_describe_remap_state(X) do { (X); } while(0)   #endif      static int alloc_remap_marker(struct remap_state *remap, int marker,    enum pt_remap_flags flags)   {    int ret;       marker = marker & 0x0f;