pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_types.c,v 1.211 2003/03/14 15:50:46 grubba Exp $ + || $Id: pike_types.c,v 1.212 2003/03/15 16:18:32 grubba Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.211 2003/03/14 15:50:46 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.212 2003/03/15 16:18:32 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"   #include "constants.h"   #include "object.h"   #include "multiset.h"
pike.git/src/pike_types.c:212:    *    */   #define PIKE_TYPE_CHUNK 128   BLOCK_ALLOC(pike_type, PIKE_TYPE_CHUNK)      static struct pike_type **pike_type_hash = NULL;   static size_t pike_type_hash_size = 0;      void debug_free_type(struct pike_type *t)   { + #ifdef DEBUG_MALLOC +  if (t == (struct pike_type *)(size_t)0x55555555) { +  Pike_fatal("Freeing dead type.\n"); +  } + #endif /* DEBUG_MALLOC */    loop:    if (!sub_ref(t)) {    unsigned INT32 hash = t->hash % pike_type_hash_size;    struct pike_type **t2 = pike_type_hash + hash;    struct pike_type *car, *cdr;    unsigned INT32 type;       while (*t2) {    if (*t2 == t) {    *t2 = t->next;