pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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: pike_types.c,v 1.57 1999/10/25 10:17:47 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.58 1999/10/26 00:08:15 hubbe 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:1371: Inside #if defined(DEBUG_MALLOC)
     #ifdef DEBUG_MALLOC   #define low_index_type(X,Y) ((struct pike_string *)debug_malloc_touch(debug_low_index_type((X),(Y))))   #else   #define low_index_type debug_low_index_type   #endif      /* FIXME, add the index */   static struct pike_string *debug_low_index_type(char *t, node *n)   { +  struct program *p;    switch(EXTRACT_UCHAR(t++))    {    case T_OBJECT:    { -  struct program *p=id_to_program(extract_type_int(t+1)); +  p=id_to_program(extract_type_int(t+1)); +  +  comefrom_int_index:    if(p && n)    {    if(n->token == F_ARROW)    {    if(FIND_LFUN(p,LFUN_ARROW)!=-1 || FIND_LFUN(p,LFUN_ASSIGN_ARROW)!=-1)    {    reference_shared_string(mixed_type_string);    return mixed_type_string;    }    }else{
pike.git/src/pike_types.c:1419:    return mixed_type_string;    }    }    }    }    }    default:    reference_shared_string(mixed_type_string);    return mixed_type_string;    +  case T_INT: + #ifdef AUTO_BIGNUM +  /* Don't force Gmp.mpz to be loaded here since this function +  * is called long before the master object is compiled... +  * /Hubbe +  */ +  p=get_auto_bignum_program_or_zero(); +  goto comefrom_int_index; + #endif    case T_VOID:    case T_FLOAT: -  case T_INT: +     return 0;       case T_OR:    {    struct pike_string *a,*b;    a=low_index_type(t,n);    t+=type_length(t);    b=low_index_type(t,n);    if(!b) return a;    if(!a) return b;
pike.git/src/pike_types.c:1618:       case T_MULTISET:    case T_MAPPING:   #if 0    return !!low_match_types(type,index_type,0);   #else    /* FIXME: Compiler warning here!!!! */    return 1;   #endif    + #ifdef AUTO_BIGNUM +  case T_INT: + #endif    case T_PROGRAM: -  /* FIXME: Should check that the index is a string. */ -  return 1; +  return !!low_match_types(string_type_string->str, index_type,0);       case T_MIXED:    return 1;       default:    return 0;    }   }      int check_indexing(struct pike_string *type,