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.231 2004/03/10 18:08:12 grubba Exp $ + || $Id: pike_types.c,v 1.232 2004/03/11 12:55:47 grubba Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.231 2004/03/10 18:08:12 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.232 2004/03/11 12:55:47 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:323:    struct pike_type *cdr,    int flag_method)   {    unsigned INT32 hash = DO_NOT_WARN((unsigned INT32)    ((ptrdiff_t)type*0x10204081)^    (0x8003*PTR_TO_INT(car))^    ~(0x10001*PTR_TO_INT(cdr)));    unsigned INT32 index = hash % pike_type_hash_size;    struct pike_type *t;    +  /* PIKE_DEBUG code */ +  if (index >= pike_type_hash_size) { +  Pike_fatal("Modulo operation failed for hash:%u, index:%u, size:%u.\n", +  hash, index, pike_type_hash_size); +  } +  /* End PIKE_DEBUG code */ +     for(t = pike_type_hash[index]; t; t = t->next) {    if ((t->hash == hash) && (t->type == type) &&    (t->car == car) && (t->cdr == cdr)) {    /* Free car & cdr as appropriate. */    switch(type) {    case T_FUNCTION:    case T_MANY:    case T_TUPLE:    case T_MAPPING:    case T_OR: