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.54 2000/01/31 03:24:05 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.55 2000/01/31 21:26:59 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:149:    md->num_keypairs=size;    }else{    md=&empty_data;    }    add_ref(md);    m->data=md;   }      /* 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_mapping();       INITIALIZE_PROT(m);    init_mapping(m,size);   
pike.git/src/mapping.c:251:    debug_malloc_touch(md);    md=m->data=copy_mapping_data(m->data);    debug_malloc_touch(md);    }      #ifdef PIKE_DEBUG    if(d_flag>1) check_mapping(m);   #endif       init_mapping(m, new_size); +  debug_malloc_touch(m);       for(e=0;e<md->hashsize;e++)    mapping_rehash_backwards(m->data, md->hash[e]);    m->data->size = md->size;      #ifdef PIKE_DEBUG    if(m->data->size != tmp)    fatal("Rehash failed, size not same any more.\n");    if(md->refs>1)    fatal("MD has extra refs in rehash!\n");