Fix Python argument count checking when using -modern

SF bug: https://sourceforge.net/p/swig/mailman/message/31957171/
SF Patch: 3471
This commit is contained in:
Arnaud Diederen 2014-03-01 16:30:22 +00:00 committed by William S Fulton
commit 8998f11ca3

View file

@ -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);
}