Branch: Tag:

2003-11-11

2003-11-11 19:21:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

pike_types_le() and match_types() now ignore the 'is' flag on object types.

Rev: src/pike_types.c:1.225

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_types.c,v 1.224 2003/11/09 01:10:14 mast Exp $ + || $Id: pike_types.c,v 1.225 2003/11/11 19:21:02 grubba Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.224 2003/11/09 01:10:14 mast Exp $"); + RCSID("$Id: pike_types.c,v 1.225 2003/11/11 19:21:02 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
2634:       case T_OBJECT:   #if 0 + #if 0    if(a->cdr || b->cdr)    {    fprintf(stderr,"Type match1: ");
2694:    }   #endif /* 1 */    } -  + #endif /* 0 */    break;       case T_INT:
3213:    if(!a->cdr)    return 0;    -  if ((a->car || !b->car) && +  /* The 'is' flag is now ignored. +  * /grubba 2003-11-11 +  */ +  +  if (/* (a->car || !b->car) && */    (a->cdr == b->cdr))    return 1;    -  if (b->car) { -  return 0; -  } -  +  /* +  * if (b->car) { +  * return 0; +  * } +  */    {    struct program *ap = id_to_program(CDR_TO_INT(a));    struct program *bp = id_to_program(CDR_TO_INT(b));
3229:    /* Shouldn't happen... */    return 0;    } -  if ((flags & LE_WEAK_OBJECTS) && (!a->car)) { +  if ((flags & LE_WEAK_OBJECTS) /* && (!a->car) */) {    return is_compatible(implements_a=ap, implements_b=bp);    }    return implements(implements_a=ap, implements_b=bp);