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.73 2000/04/22 18:48:58 mast Exp $"); + RCSID("$Id: mapping.c,v 1.74 2000/09/03 21:48:03 mast 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:856:    !k->ind.u.object->prog)    {    PREPARE_FOR_INDEX_CHANGE2();    *prev=k->next;    free_svalue(& k->ind);    free_svalue(& k->val);    k->next=md->free_list;    md->free_list=k;    md->size--;   #ifdef PIKE_DEBUG -  m->debug_size++; +  m->debug_size--;   #endif    }else{    val_types |= 1 << k->val.type;    ind_types |= 1 << k->ind.type;    prev=&k->next;    }    }    }    if(MAP_SLOTS(md->size) < md->hashsize * MIN_LINK_LENGTH)    {
pike.git/src/mapping.c:1368:    INT32 e,eq=1;      #ifdef PIKE_DEBUG    if(a->data->refs <=0)    fatal("Zero refs in mapping->data\n");    if(b->data->refs <=0)    fatal("Zero refs in mapping->data\n");   #endif       if(a==b) return 1; +  +  check_mapping_for_destruct(a); +  check_mapping_for_destruct(b); +     if(m_sizeof(a) != m_sizeof(b)) return 0;       curr.pointer_a = a;    curr.pointer_b = b;    curr.next = p;       for( ;p ;p=p->next)    if(p->pointer_a == (void *)a && p->pointer_b == (void *)b)    return 1;    -  check_mapping_for_destruct(a); -  check_mapping_for_destruct(b); -  +     md=a->data;    md->valrefs++;    add_ref(md);       NEW_MAPPING_LOOP(md)    {    struct svalue *s;    if((s=low_mapping_lookup(b, & k->ind)))    {    if(!low_is_equal(s, &k->val, &curr))