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.11 1997/01/29 21:43:07 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.12 1997/02/07 01:11:43 hubbe Exp $");   #include "main.h"   #include "types.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "macros.h"   #include "language.h"   #include "error.h"   #include "memory.h"
pike.git/src/mapping.c:1035:    INT32 e;    struct keypair *k;    struct mapping *m,*next;       for(m=first_mapping;m;m=next)    {    m->refs++;       for(e=0;e<m->hashsize;e++)    { -  for(k=m->hash[e];k;k=k->next) +  while(k=m->hash[e])    { -  +  m->hash[e]=k->next; +  k->next=m->free_list; +  m->free_list=k;    free_svalue(&k->ind);    free_svalue(&k->val);    } -  k->next=m->free_list; -  m->hash[e]=0; +     }    m->size=0;       next=m->next;       /* free_mapping(m); */    }   }      void count_memory_in_mappings(INT32 *num_, INT32 *size_)