Branch: Tag:

2016-10-25

2016-10-25 13:57:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Mappings: Update the type masks when emptying the mapping.

Fixes testsuite failure where two empty mappings weren't equal()
due to having non-overlapping type masks.

692:    add_ref(nmd); /* For DMALLOC... */    nmd->valrefs=0;    nmd->hardlinks=0; +  nmd->ind_types = md->ind_types; +  nmd->val_types = md->val_types;       /* FIXME: What about nmd->flags? */   
1185:    m->debug_size--;   #endif    +  if (UNLIKELY(!md->size)) { +  md->ind_types = md->val_types = 0; +  } +     if (!(md->flags & MAPPING_FLAG_NO_SHRINK)) {    if((MAP_SLOTS(md->size) < md->hashsize * MIN_LINK_LENGTH) &&    (md->hashsize > AVG_LINK_LENGTH)) {