pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.39 1998/04/14 22:10:49 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.40 1998/04/16 01:23:02 hubbe 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:1055:    /* check the returntype */    if(!low_match_types(a,b,flags)) return 0;    break;       case T_MAPPING:    if(!low_match_types(++a,++b,flags)) return 0;    if(!low_match_types(a+type_length(a),b+type_length(b),flags)) return 0;    break;       case T_OBJECT: + #if 0 +  if(EXTRACT_INT(a+2) || EXTRACT_INT(b+2)) +  { +  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 */    if(!EXTRACT_INT(a+2) || !EXTRACT_INT(b+2)) break;       /* object(x *) =? object(x *) */    if(EXTRACT_UCHAR(a+1) == EXTRACT_UCHAR(b+1))    {    /* x? */    if(EXTRACT_UCHAR(a+1))    {    /* object(1 x) =? object(1 x) */    if(EXTRACT_INT(a+2) != EXTRACT_INT(b+2)) return 0;    }else{    /* object(0 *) =? object(0 *) */    break;    }    }       {    struct program *ap,*bp; -  ap=id_to_program(EXTRACT_UCHAR(a+2)); -  bp=id_to_program(EXTRACT_UCHAR(b+2)); +  ap=id_to_program(EXTRACT_INT(a+2)); +  bp=id_to_program(EXTRACT_INT(b+2));       if(!ap || !bp) break;       if(EXTRACT_UCHAR(a+1))    {    if(!implements(ap,bp))    return 0;    }else{    if(!implements(bp,ap))    return 0;