Branch: Tag:

2000-02-09

2000-02-09 18:50:20 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bugfix for compiling without PIKE_DEBUG

Rev: src/mapping.c:1.64
Rev: src/mapping.h:1.22

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.63 2000/02/09 07:29:36 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.64 2000/02/09 18:50:19 hubbe Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
160:    add_ref(md);    m->data=md;   #ifdef PIKE_DEBUG -  m->size = md->size; +  m->debug_size = md->size;   #endif   }   
323: Inside #if defined(PIKE_DEBUG)
   if(m->data->size != tmp)    fatal("Rehash failed, size not same any more.\n");    -  m->size = m->data->size; +  m->debug_size = m->data->size;   #endif      #ifdef PIKE_DEBUG
623:    k->hval = h2;    md->size++;   #ifdef PIKE_DEBUG -  m->size++; +  m->debug_size++;   #endif      #ifdef PIKE_DEBUG
733:    md->val_types |= BIT_INT;    md->size++;   #ifdef PIKE_DEBUG -  m->size++; +  m->debug_size++;   #endif      #ifdef PIKE_DEBUG
808:    md->free_list=k;    md->size--;   #ifdef PIKE_DEBUG -  m->size--; +  m->debug_size--;   #endif       if(md->size < (md->hashsize + 1) * MIN_LINK_LENGTH)
862:    md->free_list=k;    md->size--;   #ifdef PIKE_DEBUG -  m->size++; +  m->debug_size++;   #endif    }else{    val_types |= 1 << k->val.type;
1573:    }    }    + #ifdef PIKE_DEBUG    if(d_flag > 1) check_mapping_type_fields(m); -  + #endif +     if(!((m->data->val_types | m->data->ind_types) & BIT_COMPLEX))    return copy_mapping(m);   
1699: Inside #if defined(PIKE_DEBUG)
   if(m->next && m->next->prev != m)    fatal("Mapping ->next->prev != mapping.\n");    -  if(m->size != md->size) +  if(m->debug_size != md->size)    fatal("Mapping zapping detected!\n");       if(m->prev)
1905:    md->free_list=k;    md->size--;   #ifdef PIKE_DEBUG -  m->size++; +  m->debug_size++;   #endif    }else{    prev=&k->next;
1988:    }    md->size=0;   #ifdef PIKE_DEBUG -  m->size=0; +  m->debug_size=0;   #endif       next=m->next;