Branch: Tag:

2001-11-12

2001-11-12 15:37:33 by Martin Stjernholm <mast@lysator.liu.se>

Fixed a stale pointer bug, first discovered by jonasw in the testsuite on
MacOS X.

Rev: src/mapping.c:1.140

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.139 2001/10/03 22:20:45 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.140 2001/11/12 15:37:33 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
1003:    }    }    +  md->val_types = val_types; +  md->ind_types = ind_types; +     if(MAP_SLOTS(md->size) < md->hashsize * MIN_LINK_LENGTH)    {    debug_malloc_touch(m);    rehash(m, MAP_SLOTS(md->size));    }    -  md->val_types = val_types; -  md->ind_types = ind_types; +    #ifdef PIKE_DEBUG    if(d_flag>1) check_mapping(m);   #endif