Branch: Tag:

1999-10-26

1999-10-26 00:08:15 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

fixed type checking for AUTO_BIGNUM

Rev: src/bignum.c:1.8
Rev: src/bignum.h:1.8
Rev: src/builtin_functions.c:1.193
Rev: src/pike_types.c:1.58

5:   \*/   /**/   #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"
1378:   /* 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)
1426:    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:
1625:    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;