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.127 2000/03/17 05:13:17 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.128 2000/03/23 19:05:08 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:3358:    sval.type = T_PROGRAM;    if ((EXTRACT_UCHAR(obj_t) != T_OBJECT) ||    (!(id = extract_type_int(obj_t + 2))) ||    (!(sval.u.program = id_to_program(id))) ||    (!(sub = get_type_of_svalue(&sval)))) {    if (res) {    free_string(res);    }    return NULL;    } +  /* FIXME: obj_t + 1 should propagate to the return-type in sub. */    if (res) {    struct pike_string *tmp = or_pike_types(res, sub, 1);    free_string(res);    free_string(sub);    return tmp;    }    return sub;   }      /* Used by fix_object_program_type() */
pike.git/src/pike_types.c:3461:      void yyexplain_nonmatching_types(struct pike_string *type_a,    struct pike_string *type_b,    int flags)   {    implements_a=0;    implements_b=0;       match_types(type_a,type_b);    + #if 0    if(!(implements_a && implements_b &&    type_a->str[0]==T_OBJECT &&    type_b->str[0]==T_OBJECT)) -  + #endif /* 0 */    {    struct pike_string *s1,*s2;    s1=describe_type(type_a);    s2=describe_type(type_b);    if(flags & YYTE_IS_WARNING)    {    yywarning("Expected: %s",s1->str);    yywarning("Got : %s",s2->str);    }else{    my_yyerror("Expected: %s",s1->str);