Branch: Tag:

2002-07-23

2002-07-23 12:01:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Weaker object type compatison tests in match_types().

Rev: src/pike_types.c:1.190

5:   \*/   /**/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.189 2002/07/03 09:05:56 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.190 2002/07/23 12:01:42 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
2516:    if(a->cdr != b->cdr) return 0;    }else{    /* object(0 *) =? object(0 *) */ -  /* FIXME: Ought to check the implements relation */ +  struct program *ap,*bp; +  ap = id_to_program((ptrdiff_t)a->cdr); +  bp = id_to_program((ptrdiff_t)b->cdr); +  if (!is_compatible(ap, bp)) return 0;    break;    }    }
2537:   #else /* !1 */    if(a->car)    { -  if(!implements(implements_a=ap,implements_b=bp)) +  if (!is_compatible(implements_a=ap,implements_b=bp)) {    return 0;    }else{ -  if(!implements(implements_a=bp,implements_b=ap)) +  if(!is_compatible(implements_a=bp,implements_b=ap))    return 0;    }   #endif /* 1 */