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.125 2000/03/10 00:53:49 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.126 2000/03/10 00:58:59 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:2743:    t+=type_length(t);    return make_shared_binary_string(t, type_length(t));       case T_ARRAY:    {    struct pike_string *a;       if(low_pike_types_le(tString, index_type, 0, 0) &&    (a = low_index_type(t, tString, n))) {    /* Possible to index the array with a string. */ -  if (low_match_types(tInt, index_type, 0)) { -  /* Also possible to index the array with an int. */ +     type_stack_mark();    push_finished_type(a);    free_string(a);    push_type(T_ARRAY); -  +  +  if (low_match_types(tInt, index_type, 0)) { +  /* Also possible to index the array with an int. */    push_unfinished_type(t);    push_type(T_OR); -  +  }    return pop_unfinished_type();    } -  return a; -  } +     if (low_match_types(tInt, index_type, 0)) {    /* Possible to index the array with an int. */    return make_shared_binary_string(t, type_length(t));    }    /* Bad index type. */    return 0;    }    }   }