pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:2691:    gc_free_svalue(&k->val); \    else \    N_REC(&k->val, 1); \   } while (0)      #define GC_REC_KP_VAL(REMOVE, N_REC, W_REC, N_TST, W_TST) do { \    if ((REMOVE = N_TST(&k->ind))) /* Don't recurse now. */ \    gc_free_svalue(&k->val); \    else if ((REMOVE = W_REC(&k->val, 1))) \    gc_free_svalue(&k->ind); \ -  else \ -  N_REC(&k->ind, 1); /* Now we can recurse the index. */ \ +  else if (N_REC(&k->ind, 1)) /* Now we can recurse the index. */ \ +  Pike_fatal("Mapping: %s and %s don't agree.\n", \ +  TOSTR(N_TST), TOSTR(N_REC)); \   } while (0)      #define GC_REC_KP_BOTH(REMOVE, N_REC, W_REC, N_TST, W_TST) do { \    if ((REMOVE = W_TST(&k->ind))) /* Don't recurse now. */ \    gc_free_svalue(&k->val); \    else if ((REMOVE = W_REC(&k->val, 1))) \    gc_free_svalue(&k->ind); \ -  else \ -  W_REC(&k->ind, 1); /* Now we can recurse the index. */ \ +  else if (W_REC(&k->ind, 1)) /* Now we can recurse the index. */ \ +  Pike_fatal("Mapping: %s and %s don't agree.\n", \ +  TOSTR(W_TST), TOSTR(W_REC)); \   } while (0)      void gc_mark_mapping_as_referenced(struct mapping *m)   {   #ifdef PIKE_DEBUG    if(m->data->refs <=0)    Pike_fatal("Zero refs in mapping->data\n");   #endif    debug_malloc_touch(m);    debug_malloc_touch(m->data);