pike.git/
src/
pike_types.c
Branch:
Tag:
Non-build tags
All tags
No tags
1996-11-25
1996-11-25 21:31:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
1d5328158bd8888e7aae9df5158d089c3098bb3c (
12
lines) (+
10
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
better error messages implemented
Rev: src/pike_types.c:1.10
Rev: src/pike_types.h:1.2
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: pike_types.c,v 1.
9
1996/11/
18
20
:
56
:
25
hubbe Exp $");
+
RCSID("$Id: pike_types.c,v 1.
10
1996/11/
25
21
:
31
:
54
hubbe Exp $");
#include <ctype.h> #include "svalue.h" #include "pike_types.h"
19:
#include "macros.h" #include "error.h"
+
int max_correct_args;
+
static void internal_parse_type(char **s); static int type_length(char *t);
649:
*/ static char *low_match_types(char *a,char *b, int flags) {
+
int correct_args;
char *ret; if(a == b) return a;
712:
switch(EXTRACT_UCHAR(a)) { case T_FUNCTION:
+
correct_args=0;
a++; b++; while(EXTRACT_UCHAR(a)!=T_MANY || EXTRACT_UCHAR(b)!=T_MANY)
734:
} if(!low_match_types(a_tmp, b_tmp, flags)) return 0;
+
if(++correct_args > max_correct_args)
+
max_correct_args=correct_args;
} /* check the 'many' type */ a++;
1004:
CHECK_TYPE(args); CHECK_TYPE(type); reset_type_stack();
+
max_correct_args=0;
if(low_get_return_type(type->str,args->str)) { return pop_type();