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.112 1999/12/23 21:22:37 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.113 1999/12/26 18:53:33 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:2366:    !low_pike_types_le(a, b, 0, flags)) {    return 0;    }    }    }       a+=type_length(a);    b+=type_length(b);       /* check the returntype */ -  if (EXTRACT_UCHAR(b) != T_VOID) { -  /* FIXME: Check if a has type void here? */ +  /* FIXME: Check array_cnt */ +  if ((EXTRACT_UCHAR(b) != T_VOID) && (EXTRACT_UCHAR(a) != T_VOID)) {    if(!low_pike_types_le(a, b, array_cnt, flags)) return 0;    }    return 1;    }       if (array_cnt) return 0;       switch(EXTRACT_UCHAR(a))    {    case T_MAPPING:
pike.git/src/pike_types.c:3440:    s2=describe_type(type_b);    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);   } +  +  + struct pike_string *make_pike_type(char *t) + { +  return make_shared_binary_string(t, type_length(t)); + }