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.28 1998/02/11 00:05:01 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.29 1998/04/20 18:53:17 grubba 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:855:    struct mapping *ret;    INT32 e;    struct keypair *k;       doing.next=p;    doing.pointer_a=(void *)m;    for(;p;p=p->next)    {    if(p->pointer_a == (void *)m)    { -  ret=(struct mapping *)p->pointer_b; -  ret->refs++; +  add_ref(ret=(struct mapping *)p->pointer_b);    return ret;    }    }       ret=allocate_mapping(MAP_SLOTS(m->size));    doing.pointer_b=ret;       check_stack(2);       LOOP(m)
pike.git/src/mapping.c:1051:   {    INT32 e;    struct keypair *k;    struct mapping *m,*next;       for(m=first_mapping;m;m=next)    {    check_mapping_for_destruct(m);    if(gc_do_free(m))    { -  m->refs++; +  add_ref(m);       for(e=0;e<m->hashsize;e++)    {    k=m->hash[e];    while(k)    {    free_svalue(&k->ind);    free_svalue(&k->val);       if(k->next)
pike.git/src/mapping.c:1122:   #endif      void zap_all_mappings(void)   {    INT32 e;    struct keypair *k;    struct mapping *m,*next;       for(m=first_mapping;m;m=next)    { -  m->refs++; +  add_ref(m);      #if defined(DEBUG) && defined(DEBUG_MALLOC)    if(verbose_debug_exit)    debug_dump_mapping(m);   #endif       for(e=0;e<m->hashsize;e++)    {    while((k=m->hash[e]))    {