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.51 2000/01/28 21:00:44 grubba Exp $"); + RCSID("$Id: mapping.c,v 1.52 2000/01/28 22:06:42 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:1613:   void gc_mark_mapping_as_referenced(struct mapping *m)   {    INT32 e;    struct keypair *k;      #ifdef PIKE_DEBUG    if(m->data->refs <=0)    fatal("Zero refs in mapping->data\n");   #endif    -  if(gc_mark(m)) +  if(gc_mark(m) && gc_mark(m->data))    {    if((m->data->ind_types | m->data->val_types) & BIT_COMPLEX)    {    MAPPING_LOOP(m)    {    /* We do not want to count this key:index pair if    * the index is a destructed object or function    */    if(((1 << k->ind.type) & (BIT_OBJECT | BIT_FUNCTION)) &&    !(k->ind.u.object->prog))
pike.git/src/mapping.c:1654:   void gc_check_all_mappings(void)   {    INT32 e;    struct keypair *k;    struct mapping *m;       for(m=first_mapping;m;m=m->next)    {    if((m->data->ind_types | m->data->val_types) & BIT_COMPLEX)    { +  if(gc_check(m->data)) continue; +     MAPPING_LOOP(m)    {    /* We do not want to count this key:index pair if    * the index is a destructed object or function    */    if(((1 << k->ind.type) & (BIT_OBJECT | BIT_FUNCTION)) &&    !(k->ind.u.object->prog))    continue;       debug_gc_check_svalues(&k->ind, 1, T_MAPPING, m);