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.126 2000/03/10 00:58:59 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.127 2000/03/17 05:13:17 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:3453:    {    struct program *p=id_to_program(extract_type_int(type+1));    if(!p) return 1;    return FIND_LFUN(p, lfun)!=-1;    }    }   }         void yyexplain_nonmatching_types(struct pike_string *type_a, -  struct pike_string *type_b) +  struct pike_string *type_b, +  int flags)   {    implements_a=0;    implements_b=0;       match_types(type_a,type_b);       if(!(implements_a && implements_b &&    type_a->str[0]==T_OBJECT &&    type_b->str[0]==T_OBJECT))    {    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);    my_yyerror("Got : %s",s2->str); -  +  }    free_string(s1);    free_string(s2);    }       if(implements_a && implements_b) -  yyexplain_not_implements(implements_a,implements_b); +  yyexplain_not_implements(implements_a,implements_b,flags);   }         struct pike_string *make_pike_type(char *t)   {    return make_shared_binary_string(t, type_length(t));   }