Fix handling of default arguments after ignored ones in Python.
Don't skip checking subsequent arguments just because one of them has "in" typemap with numinputs=0 attribute. Add a unit test showing the problem which is relatively rare as it doesn't happen for the class methods and is hidden unless autodoc feature is used for the global functions. Closes #377.
This commit is contained in:
parent
d64c241e1c
commit
6988b00aba
4 changed files with 28 additions and 5 deletions
|
|
@ -2003,17 +2003,16 @@ public:
|
|||
Parm *pnext;
|
||||
|
||||
for (p = plist; p; p = pnext) {
|
||||
pnext = NIL;
|
||||
pnext = nextSibling(p);
|
||||
String *tm = Getattr(p, "tmap:in");
|
||||
if (tm) {
|
||||
pnext = Getattr(p, "tmap:in:next");
|
||||
Parm *in_next = Getattr(p, "tmap:in:next");
|
||||
if (in_next)
|
||||
pnext = in_next;
|
||||
if (checkAttribute(p, "tmap:in:numinputs", "0")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!pnext) {
|
||||
pnext = nextSibling(p);
|
||||
}
|
||||
|
||||
// "default" typemap can contain arbitrary C++ code, so while it could, in
|
||||
// principle, be possible to examine it and check if it's just something
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue