Branch: Tag:

2000-09-03

2000-09-03 21:48:03 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bugs in mapping_equal_p due to too late destruct checks. Fixed a
bogus debug_size adjustment.

Rev: src/mapping.c:1.74

5:   \*/   /**/   #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"
863:    md->free_list=k;    md->size--;   #ifdef PIKE_DEBUG -  m->debug_size++; +  m->debug_size--;   #endif    }else{    val_types |= 1 << k->val.type;
1375:   #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;
1385:    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);