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.140 2001/11/12 15:37:33 mast Exp $"); + RCSID("$Id: mapping.c,v 1.141 2001/11/24 23:18:47 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"   #include "interpret.h"
pike.git/src/mapping.c:59:    DOUBLEUNLINK(first_mapping, m); \    \    GC_FREE(m); \   }while(0)         #undef COUNT_OTHER      #define COUNT_OTHER() do{ \    struct mapping *m; \ +  double datasize = 0.0; \    for(m=first_mapping;m;m=m->next) \    { \ -  num++; \ -  size+=MAPPING_DATA_SIZE(m->data->hashsize, m->data->num_keypairs); \ +  datasize+=MAPPING_DATA_SIZE(m->data->hashsize, m->data->num_keypairs) / \ +  (double) m->data->refs; \    } \ -  +  size += (INT32) datasize; \   }while(0)      BLOCK_ALLOC(mapping, 511)      #ifndef PIKE_MAPPING_KEYPAIR_LOOP   #define FREE_KEYPAIR(md, k) do { \    k->next = md->free_list; \    md->free_list = k; \    } while(0)   #else /* PIKE_MAPPING_KEYPAIR_LOOP */