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:
Marcelo Matus 2006-02-03 09:08:27 +00:00
commit 214dfb6b8e
3 changed files with 13 additions and 1 deletions

View file

@ -1745,7 +1745,7 @@ public:
} else {
if (noargs) {
Printv(f->def, "SWIGINTERN PyObject *", wname,
"(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {", NIL);
"(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {", NIL);
} else {
Printv(f->def, "SWIGINTERN PyObject *", wname,
"(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {", NIL);
@ -1755,6 +1755,9 @@ public:
} else if (!noargs) {
Printf(parse_args,"if(!SWIG_Python_UnpackTuple(args,\"%s\",%d,%d,swig_obj)) SWIG_fail;\n",
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 {