pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:2521: Inside #if defined(PIKE_DEBUG)
   struct mapping *m;    for(m=first_mapping;m;m=m->next)    check_mapping(m);   }   #endif      static void visit_mapping_data (struct mapping_data *md, int action,    void *extra)   {    visit_enter(md, T_MAPPING_DATA, extra); -  switch (action) { +  switch (action & VISIT_MODE_MASK) {   #ifdef PIKE_DEBUG    default:    Pike_fatal ("Unknown visit action %d.\n", action);    case VISIT_NORMAL:    case VISIT_COMPLEX_ONLY:    break;   #endif    case VISIT_COUNT_BYTES:    mc_counted_bytes += MAPPING_DATA_SIZE (md->hashsize, md->num_keypairs);    break;    }    -  if ((md->ind_types | md->val_types) & +  if (!(action & VISIT_NO_REFS) && +  (md->ind_types | md->val_types) &    (action & VISIT_COMPLEX_ONLY ? BIT_COMPLEX : BIT_REF_TYPES)) {    int ind_ref_type =    md->flags & MAPPING_WEAK_INDICES ? REF_TYPE_WEAK : REF_TYPE_NORMAL;    int val_ref_type =    md->flags & MAPPING_WEAK_VALUES ? REF_TYPE_WEAK : REF_TYPE_NORMAL;    INT32 e;    struct keypair *k;    NEW_MAPPING_LOOP (md) {    visit_svalue (&k->ind, ind_ref_type, extra);    visit_svalue (&k->val, val_ref_type, extra);    }    }    visit_leave(md, T_MAPPING_DATA, extra);   }      PMOD_EXPORT void visit_mapping (struct mapping *m, int action, void *extra)   {    visit_enter(m, T_MAPPING, extra); -  switch (action) { +  switch (action & VISIT_MODE_MASK) {   #ifdef PIKE_DEBUG    default:    Pike_fatal ("Unknown visit action %d.\n", action);    case VISIT_NORMAL:    case VISIT_COMPLEX_ONLY:    break;   #endif    case VISIT_COUNT_BYTES:    mc_counted_bytes += sizeof (struct mapping);    break;