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.107 1999/12/19 18:42:55 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.108 1999/12/21 17:19:55 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:2054:    return 1;    } else {    return low_pike_types_le(a, b, array_cnt);    }    }       case T_NOT:    if (EXTRACT_UCHAR(b) == T_NOT) {    return low_pike_types_le(b+1, a+1, -array_cnt);    } +  if (EXTRACT_UCHAR(a+1) == T_NOT) { +  return low_pike_types_le(a+2, b, array_cnt); +  }    if (low_pike_types_le(a+1, b, array_cnt)) {    return 0;    }    /* FIXME: This is wrong... */ -  return low_pike_types_le(b, a+1, -array_cnt); +  return !low_pike_types_le(b, a+1, -array_cnt);       case T_ASSIGN:    ret=low_pike_types_le(a+2, b, array_cnt);    if(ret && EXTRACT_UCHAR(b)!=T_VOID)    {    int m=EXTRACT_UCHAR(a+1)-'0';    struct pike_string *tmp;    int i;    type_stack_mark();    push_unfinished_type_with_markers(b, b_markers);
pike.git/src/pike_types.c:2126:       case T_OR:    /* OK if a is a subset of either of the parts. */    b++;    ret=low_pike_types_le(a, b, array_cnt);    if (ret) return ret;    b+=type_length(b);    return low_pike_types_le(a, b, array_cnt);       case T_NOT: +  if (EXTRACT_UCHAR(b+1) == T_NOT) { +  return low_pike_types_le(a, b+2, array_cnt); +  }    if (low_pike_types_le(a, b+1, array_cnt)) {    return 0;    }    /* FIXME: This is wrong... */ -  return low_pike_types_le(b+1, a, -array_cnt); +  return !low_pike_types_le(b+1, a, -array_cnt);       case T_ASSIGN:    ret=low_pike_types_le(a, b+2, array_cnt);    if(ret && EXTRACT_UCHAR(a)!=T_VOID)    {    int m=EXTRACT_UCHAR(b+1)-'0';    struct pike_string *tmp;    int i;    type_stack_mark();    push_unfinished_type_with_markers(a, a_markers);
pike.git/src/pike_types.c:2328:    b+=type_length(b);    }       if (EXTRACT_UCHAR(a_tmp) != T_VOID) {    if (!low_pike_types_le(b_tmp, a_tmp, 0)) return 0;    }    }    /* check the 'many' type */    a++;    b++; -  if (EXTRACT_UCHAR(a) != T_VOID) { +  if ((EXTRACT_UCHAR(a) != T_VOID) && (EXTRACT_UCHAR(b) != T_VOID)) {    if (!low_pike_types_le(b, a, 0))    return 0;    }       a+=type_length(a);    b+=type_length(b);       /* check the returntype */    if (EXTRACT_UCHAR(b) != T_VOID) {    /* FIXME: Check if a has type void here? */