Branch: Tag:

1999-12-21

1999-12-21 17:19:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed bug in T_VOID handling in pike_types_le().
Improved T_NOT handling in pike_types_le()?

Rev: src/pike_types.c:1.108

5:   \*/   /**/   #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"
2061:    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);
2133:    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);
2335:    /* 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;    }