pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.57 2000/02/01 23:51:47 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.58 2000/02/03 02:37:22 hubbe Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "language.h"   #include "error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"
pike.git/src/mapping.c:293:    debug_malloc_touch(m);    new_md=m->data;       /* This operation is now 100% atomic - no locking required */    if(md->refs>1)    {    /* good */    for(e=0;e<md->hashsize;e++)    mapping_rehash_backwards_good(new_md, md->hash[e]);    -  if(md->hardlinks) md->hardlinks--; +  if(md->hardlinks) +  { +  md->hardlinks--; +  md->valrefs--; +  }    free_mapping_data(md);    }else{    /* evil */    for(e=0;e<md->hashsize;e++)    mapping_rehash_backwards_evil(new_md, md->hash[e]);       free((char *)md);    }      #ifdef PIKE_DEBUG