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.73 1999/11/25 00:09:56 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.74 1999/11/25 00:56:25 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:984:    else if (EXTRACT_UCHAR(t1) == T_ZERO)    {    push_unfinished_type(t2);    }    else if(EXTRACT_UCHAR(t1)==T_MIXED || EXTRACT_UCHAR(t2)==T_MIXED)    {    push_type(T_MIXED);    }    else if(EXTRACT_UCHAR(t1)==T_INT && EXTRACT_UCHAR(t2)==T_INT)    { +  /* FIXME: +  * This should only be done if the ranges are +  * overlapping or adjecant to each other. /Hubbe +  */    INT32 i1,i2;    i1=extract_type_int(t1+1+sizeof(INT32));    i2=extract_type_int(t2+1+sizeof(INT32));    push_type_int(MAXIMUM(i1,i2));       i1=extract_type_int(t1+1);    i2=extract_type_int(t2+1);    push_type_int(MINIMUM(i1,i2));       push_type(T_INT);
pike.git/src/pike_types.c:1457:   #endif    return low_match_types(a, b_markers[m]->str, flags);    }    else    return low_match_types(a, mixed_type_string->str, flags);    }    }       /* 'mixed' matches anything */    -  if((EXTRACT_UCHAR(a) == T_ZERO && !(flags & A_EXACT) && -  EXTRACT_UCHAR(b) != T_VOID) || -  (EXTRACT_UCHAR(a) == T_MIXED && !(flags & A_EXACT))) +  if(((EXTRACT_UCHAR(a) == T_ZERO || EXTRACT_UCHAR(a) == T_MIXED) && +  !(flags & A_EXACT) && +  EXTRACT_UCHAR(b) != T_VOID))    {   #if 1    switch(EXTRACT_UCHAR(b))    {    /* These types can contain sub-types */    case T_ARRAY:    low_match_types(array_type_string->str,b , flags);    break;    case T_MAPPING:    low_match_types(mapping_type_string->str,b, flags);
pike.git/src/pike_types.c:1482: Inside #if 1
   low_match_types(function_type_string->str,b, flags);    break;    case T_MULTISET:    low_match_types(multiset_type_string->str,b, flags);    break;    }   #endif    return a;    }    -  if((EXTRACT_UCHAR(b) == T_MIXED && !(flags & B_EXACT)) || -  (EXTRACT_UCHAR(b) == T_ZERO && !(flags & B_EXACT) && +  if((( EXTRACT_UCHAR(b) == T_ZERO || EXTRACT_UCHAR(b) == T_MIXED) && +  !(flags & B_EXACT) &&    EXTRACT_UCHAR(a) != T_VOID))    {   #if 1    switch(EXTRACT_UCHAR(a))    {    /* These types can contain sub-types */    case T_ARRAY:    low_match_types(a , array_type_string->str, flags);    break;    case T_MAPPING: