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:
parent
613ff08150
commit
83ea2280e2
11 changed files with 199 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue