pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*\   ||| 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.   \*/   /**/   #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"   #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:2509:    /* object(x *) =? object(x *) */    if(a->car == b->car)    {    /* x? */    if(a->car)    {    /* object(1 x) =? object(1 x) */    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;    }    }       {    struct program *ap,*bp;    ap = id_to_program((ptrdiff_t)a->cdr);    bp = id_to_program((ptrdiff_t)b->cdr);       if(!ap || !bp) break;      #if 0    /* FIXME: Temporary kludge.    * match_types() currently seems to need to be symetric.    */    if (!implements(ap,bp) && !implements(bp,ap))    return 0;   #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 */    }       break;       case T_INT:    {    INT32 amin = (ptrdiff_t)a->car;