Wide range of minor bug fixes and improvements.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@966 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-12-22 04:27:51 +00:00
commit 5c13fac1d5
10 changed files with 132 additions and 28 deletions

View file

@ -159,6 +159,39 @@ String *Swig_string_mangle(String *s) {
return t;
}
/* -----------------------------------------------------------------------------
* Swig_proto_cmp()
*
* Compares a function prototype against an expected type-string.
* For example, Swig_proto_cmp("f(p.void,p.Tcl_Interp,int,p.p.char).int", node)
* ----------------------------------------------------------------------------- */
int
Swig_proto_cmp(const String_or_char *pat, DOH *node) {
SwigType *ty;
SwigType *ct;
ParmList *p;
List *tl;
int r;
ty = Gettype(node);
p = Getparms(node);
if (!ty || !p) return -1;
ct = Copy(ty);
tl = NewList();
while (p) {
Append(tl,Gettype(p));
p = Getnext(p);
}
SwigType_add_function(ct,tl);
SwigType_strip_qualifiers(ct);
r = Cmp(pat,ct);
Delete(ct);
Delete(tl);
return r;
}
/* -----------------------------------------------------------------------------
* Swig_init()
*