add missing check for noargs
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ab81492fb8
commit
214dfb6b8e
3 changed files with 13 additions and 1 deletions
|
|
@ -8,4 +8,8 @@ typedef int Integer;
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::Integer bar() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
5
SWIG/Examples/test-suite/python/global_ns_arg_runme.py
Normal file
5
SWIG/Examples/test-suite/python/global_ns_arg_runme.py
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
from global_ns_arg import *
|
||||||
|
|
||||||
|
a = foo(1)
|
||||||
|
b = bar()
|
||||||
|
|
||||||
|
|
@ -1745,7 +1745,7 @@ public:
|
||||||
} else {
|
} else {
|
||||||
if (noargs) {
|
if (noargs) {
|
||||||
Printv(f->def, "SWIGINTERN PyObject *", wname,
|
Printv(f->def, "SWIGINTERN PyObject *", wname,
|
||||||
"(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {", NIL);
|
"(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {", NIL);
|
||||||
} else {
|
} else {
|
||||||
Printv(f->def, "SWIGINTERN PyObject *", wname,
|
Printv(f->def, "SWIGINTERN PyObject *", wname,
|
||||||
"(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {", NIL);
|
"(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {", NIL);
|
||||||
|
|
@ -1755,6 +1755,9 @@ public:
|
||||||
} else if (!noargs) {
|
} else if (!noargs) {
|
||||||
Printf(parse_args,"if(!SWIG_Python_UnpackTuple(args,\"%s\",%d,%d,swig_obj)) SWIG_fail;\n",
|
Printf(parse_args,"if(!SWIG_Python_UnpackTuple(args,\"%s\",%d,%d,swig_obj)) SWIG_fail;\n",
|
||||||
iname, num_required, num_arguments);
|
iname, num_required, num_arguments);
|
||||||
|
} else if (noargs) {
|
||||||
|
Printf(parse_args,"if(!SWIG_Python_UnpackTuple(args,\"%s\",%d,%d,0)) SWIG_fail;\n",
|
||||||
|
iname, num_required, num_arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue