Fix Python compile errors with overloading and varargs

Fixes wrapping overloaded functions/constructors where a vararg
function is declared after a non-vararg function.
This is a long standing bug in the Python layer exposed since fastunpack
was turned on by default.
This commit is contained in:
William S Fulton 2019-02-25 19:27:23 +00:00
commit 83ea2280e2
11 changed files with 199 additions and 22 deletions

View file

@ -254,3 +254,19 @@ int ParmList_has_defaultargs(ParmList *p) {
}
return 0;
}
/* ---------------------------------------------------------------------
* ParmList_has_varargs()
*
* Returns 1 if the parameter list passed in has varargs.
* Otherwise returns 0.
* ---------------------------------------------------------------------- */
int ParmList_has_varargs(ParmList *p) {
Parm *lp = 0;
while (p) {
lp = p;
p = nextSibling(p);
}
return lp ? SwigType_isvarargs(Getattr(lp, "type")) : 0;
}