disable kwargs in more cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8258 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f3cd3bfe21
commit
5c5ca16bfc
1 changed files with 3 additions and 2 deletions
|
|
@ -1270,8 +1270,7 @@ public:
|
|||
|
||||
int check_kwargs(Node *n) {
|
||||
return (use_kw || GetFlag(n,"feature:kwargs"))
|
||||
&& !GetFlag(n,"memberset") && !GetFlag(n,"memberget")
|
||||
&& !checkAttribute(n,"nodeType","destructor");
|
||||
&& !GetFlag(n,"memberset") && !GetFlag(n,"memberget");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1490,6 +1489,8 @@ public:
|
|||
/* Get number of required and total arguments */
|
||||
num_arguments = emit_num_arguments(l);
|
||||
num_required = emit_num_required(l);
|
||||
if (((num_arguments == 0) && (num_required == 0)) ||
|
||||
((num_arguments == 1) && (num_required == 1) && Getattr(l,"self"))) allow_kwargs = 0;
|
||||
varargs = emit_isvarargs(l);
|
||||
int funpack = modernargs && fastunpack && !varargs && !allow_kwargs ;
|
||||
int noargs = funpack && (num_required == 0 && num_arguments == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue