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.25 1998/02/13 00:44:26 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.26 1998/03/03 11:24:34 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:57: Inside #if defined(DEBUG)
   if(ind_types & ~(m->ind_types))    fatal("Mapping indices types out of order!\n");   }   #endif         /* This function allocates the hash table and svalue space for a mapping    * struct. The size is the max number of indices that can fit in the    * allocated space.    */ - static void init_mapping(struct mapping *m, INT32 size) + #ifdef DEBUG_MALLOC + #define init_mapping(X,Y) debug_init_mapping((struct mapping *)debug_malloc_touch(X),Y) + #else + #define init_mapping debug_init_mapping + #endif + static void debug_init_mapping(struct mapping *m, INT32 size)   {    char *tmp;    INT32 e;    INT32 hashsize,hashspace;      #ifdef DEBUG    if(size < 0) fatal("init_mapping with negative value.\n");   #endif    if(size)    {
pike.git/src/mapping.c:97:    m->hash=0;    m->free_list=0;    }    m->ind_types = 0;    m->val_types = 0;    m->size = 0;   }      /* This function allocates an empty mapping with room for 'size' values    */ - struct mapping *allocate_mapping(int size) + struct mapping *debug_allocate_mapping(int size)   {    struct mapping *m;       GC_ALLOC();       m=ALLOC_STRUCT(mapping);       init_mapping(m,size);       m->next = first_mapping;