Fix functors (wrapped as __call__) when using -builtin -modern -fastunpack.
This commit is contained in:
parent
bf85b6f7a9
commit
c6547ac44e
5 changed files with 57 additions and 1 deletions
|
|
@ -3020,8 +3020,9 @@ public:
|
|||
}
|
||||
Printf(parse_args, "if ((nobjs < %d) || (nobjs > %d)) SWIG_fail;\n", num_required, num_arguments);
|
||||
} else {
|
||||
int is_tp_call = Equal(Getattr(n, "feature:python:slot"), "tp_call");
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", PyObject *args", builtin_kwargs, ") {", NIL);
|
||||
if (onearg && !builtin_ctor) {
|
||||
if (onearg && !builtin_ctor && !is_tp_call) {
|
||||
Printf(parse_args, "if (!args) SWIG_fail;\n");
|
||||
Append(parse_args, "swig_obj[0] = args;\n");
|
||||
} else if (!noargs) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue