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. - || $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"   #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:2627:    {    case T_MAPPING:    if(!low_match_types(a->car, b->car,    flags & ~(A_EXACT|B_EXACT))) return 0;    if(!low_match_types(a->cdr, b->cdr,    flags & ~(A_EXACT|B_EXACT))) return 0;    break;       case T_OBJECT:   #if 0 + #if 0    if(a->cdr || b->cdr)    {    fprintf(stderr,"Type match1: ");    stupid_describe_type(a,type_length(a));    fprintf(stderr,"Type match2: ");    stupid_describe_type(b,type_length(b));    }   #endif       /* object(* 0) matches any object */
pike.git/src/pike_types.c:2687:    if(a->car)    {    if (!is_compatible(implements_a=ap,implements_b=bp))    return 0;    }else{    if(!is_compatible(implements_a=bp,implements_b=ap))    return 0;    }   #endif /* 1 */    } -  + #endif /* 0 */    break;       case T_INT:    {    INT32 amin = CAR_TO_INT(a);    INT32 amax = CDR_TO_INT(a);       INT32 bmin = CAR_TO_INT(b);    INT32 bmax = CDR_TO_INT(b);   
pike.git/src/pike_types.c:3206:    * object(0 x) <= object(0 y) iff x is_compatible y    */       /* object(* 0) matches any object */    if(!b->cdr)    return 1;       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));       if (!ap || !bp) {    /* 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);    }    break;       case T_INT:    {    INT32 amin = CAR_TO_INT(a);    INT32 amax = CDR_TO_INT(a);