Branch: Tag:

2007-03-20

2007-03-20 17:39:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added string0_type_string.
Fixed bug in low_index_type() when indexing arrays with strings narrower than 32 bits.

Rev: src/pike_types.c:1.263

2:   || 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.262 2007/03/03 16:46:13 grubba Exp $ + || $Id: pike_types.c,v 1.263 2007/03/20 17:39:04 grubba Exp $   */      #include "global.h"
55:      int max_correct_args;    + PMOD_EXPORT struct pike_type *string0_type_string;   PMOD_EXPORT struct pike_type *string_type_string;   PMOD_EXPORT struct pike_type *int_type_string;   PMOD_EXPORT struct pike_type *float_type_string;
3769:    {    struct pike_type *a;    -  if(low_pike_types_le(string_type_string, index_type, 0, 0) && -  (a = low_index_type(t->car, string_type_string, n))) { +  if(low_pike_types_le(string0_type_string, index_type, 0, 0) && +  (a = low_index_type(t->car, string0_type_string, n))) {    /* Possible to index the array with a string. */    type_stack_mark();    push_finished_type(a);
5241:    pike_type_hash_size = PIKE_TYPE_HASH_SIZE;    init_pike_type_blocks();    -  string_type_string = CONSTTYPE(tString); +  string0_type_string = CONSTTYPE(tStr0); +  string_type_string = CONSTTYPE(tStr32);    int_type_string = CONSTTYPE(tInt);    object_type_string = CONSTTYPE(tObj);    program_type_string = CONSTTYPE(tPrg(tObj));
5270:    }   #endif /* DEBUG_MALLOC */    +  free_type(string0_type_string);    free_type(string_type_string);    free_type(int_type_string);    free_type(float_type_string);