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.37 1998/11/22 11:03:02 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.38 2001/07/03 02:41:50 david%hedbor.org 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:143:       if(m->next) m->next->prev = m->prev;       if(m->hash)    free((char *)m->hash);    free((char *)m);       GC_FREE();   }    + void do_free_mapping(struct mapping *m) + { +  if (m) +  free_mapping(m); + } +    /* This function is used to rehash a mapping without loosing the internal    * order in each hash chain. This is to prevent mappings from becoming    * very inefficient just after being rehashed.    */   static void mapping_rehash_backwards(struct mapping *m, struct keypair *p)   {    unsigned INT32 h;    struct keypair *tmp;       if(!p) return;