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.67 2000/03/07 18:32:49 grubba Exp $"); + RCSID("$Id: mapping.c,v 1.68 2000/03/07 23:22:40 grubba 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:1955: Inside #if defined(PIKE_DEBUG)
   init_buf();    describe_mapping(m,0,2);    s=simple_free_buf();    fprintf(stderr,"%s\n",s);    free(s);   }         void debug_dump_mapping(struct mapping *m)   { -  fprintf(stderr,"Refs=%d, next=%p, prev=%p, size=%d, hashsize=%d\n", -  m->refs, -  m->next, -  m->prev, -  m->data->size, -  m->data->hashsize); -  fprintf(stderr,"Indices type field = "); +  fprintf(stderr, "Refs=%d, next=%p, prev=%p", +  m->refs, m->next, m->prev); +  if (((int)m->data) & 3) { +  fprintf(stderr, ", data=%p (unaligned)\n", m->data); +  } else { +  fprintf(stderr, ", size=%d, hashsize=%d\n", +  m->data->size, m->data->hashsize); +  fprintf(stderr, "Indices type field = ");    debug_dump_type_field(m->data->ind_types); -  fprintf(stderr,"\n"); -  fprintf(stderr,"Values type field = "); +  fprintf(stderr, "\n"); +  fprintf(stderr, "Values type field = ");    debug_dump_type_field(m->data->val_types); -  fprintf(stderr,"\n"); +  fprintf(stderr, "\n"); +  }    simple_describe_mapping(m);   }   #endif      void zap_all_mappings(void)   {    INT32 e;    struct keypair *k;    struct mapping *m,*next;    struct mapping_data *md;