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.59 2000/02/04 00:50:58 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.60 2000/02/04 19:25:10 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:33:    ( (struct keypair *)DO_ALIGN( (long) (((struct mapping_data *)(MD))->hash + HSIZE), ALIGNOF(struct keypair)) )      #define MAPPING_DATA_SIZE(HSIZE, KEYPAIRS) \    (long)( MD_KEYPAIRS(0, HSIZE) + KEYPAIRS )            #undef EXIT_BLOCK   #define EXIT_BLOCK(m) \    INT32 e; \ - DO_IF_DEBUG( \ + DO_IF_DEBUG( \    if(m->refs) \    fatal("really free mapping on mapping with nonzero refs.\n"); \   ) \    \    FREE_PROT(m); \    \ -  +  if(m->data->hardlinks) \ +  { \ +  m->data->hardlinks--; \ +  m->data->valrefs--; \ +  } \    free_mapping_data(m->data); \    \    if(m->prev) \    m->prev->next = m->next; \    else \    first_mapping = m->next; \    \    if(m->next) m->next->prev = m->prev; \    \    GC_FREE();