From 8998f11ca39d60ae4593a3fab2fc86ab92439003 Mon Sep 17 00:00:00 2001 From: Arnaud Diederen Date: Sat, 1 Mar 2014 16:30:22 +0000 Subject: [PATCH] Fix Python argument count checking when using -modern SF bug: https://sourceforge.net/p/swig/mailman/message/31957171/ SF Patch: 3471 --- Source/Modules/python.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 039623e62..d570ebd31 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -2565,7 +2565,7 @@ public: Printf(parse_args, "if (!SWIG_Python_UnpackTuple(args,\"%s\",%d,%d,0)) SWIG_fail;\n", iname, num_fixed_arguments, tuple_arguments); } } - } else if (tuple_arguments > 0) { + } else { Printf(parse_args, "if(!PyArg_UnpackTuple(args,(char *)\"%s\",%d,%d", iname, num_fixed_arguments, tuple_arguments); Printv(parse_args, arglist, ")) SWIG_fail;\n", NIL); }