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.30 1998/01/26 19:59:58 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.31 1998/02/20 00:55:23 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:921:   #endif      /* FIXME, add the index */   static struct pike_string *debug_low_index_type(char *t, node *n)   {    switch(EXTRACT_UCHAR(t++))    {    case T_OBJECT:    {    struct program *p=id_to_program(EXTRACT_INT(t)); -  if(p) +  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{    if(FIND_LFUN(p,LFUN_INDEX) != -1 || FIND_LFUN(p,LFUN_ASSIGN_INDEX) != -1)
pike.git/src/pike_types.c:986:    case T_STRING: /* always int */    case T_MULTISET: /* always int */    reference_shared_string(int_type_string);    return int_type_string;       case T_MAPPING:    t+=type_length(t);    return make_shared_binary_string(t, type_length(t));       case T_ARRAY: -  if(low_match_types(string_type_string->str,CDR(n)->type->str,0)) +  if(n && low_match_types(string_type_string->str,CDR(n)->type->str,0))    {    struct pike_string *a=low_index_type(t,n);    if(!a)    return make_shared_binary_string(t, type_length(t));       type_stack_mark();    push_finished_type(a);    free_string(a);    push_type(T_ARRAY);    if(low_match_types(int_type_string->str,CDR(n)->type->str,0))