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.74 1999/11/25 00:56:25 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.75 1999/11/25 01:01:44 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:1922:    if(!low_pike_types_le(a,b)) return 0;    break;       case T_MAPPING:    /*    * mapping(A:B) <= mapping(C:D) iff ((C <= A) || (A <= C)) && B <= D.    *    * The reason for the weak index type test, is that it's not an error    * to index a mapping with a nonexistant key.    */ -  if(!low_pike_types_le(++b,++a) && !low_pike_types_le(b, a)) return 0; +  if(!low_pike_types_le(++b,++a) && !low_pike_types_le(a, b)) return 0;    return low_pike_types_le(a+type_length(a),b+type_length(b));       case T_OBJECT:   #if 0    if(extract_type_int(a+2) || extract_type_int(b+2))    {    fprintf(stderr,"Type match1: ");    stupid_describe_type(a,type_length(a));    fprintf(stderr,"Type match2: ");    stupid_describe_type(b,type_length(b));
pike.git/src/pike_types.c:2218:    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(n &&    (CDR(n)->token == F_CONSTANT ? -  CDR(n)->u.sval.type == T_STRING : -  low_match_types(string_type_string->str,CDR(n)->type->str,0))) +  (CDR(n)->u.sval.type == T_STRING) : +  !!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))