diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 6ca64e10f..56c568efa 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -2810,7 +2810,7 @@ public: /* Generate code for argument marshalling */ if (funpack) { - if (num_arguments > 0 && !overname) { + if (num_arguments > (builtin_self && !constructor ? 1 : 0) && !overname) { sprintf(source, "PyObject *swig_obj[%d]", num_arguments); Wrapper_add_localv(f, "swig_obj", source, NIL); }