summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-03-21 20:59:54 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-03-21 20:59:54 +0000
commit9f0b9da024696c19573f0566adceea277e36f0cd (patch)
treeb264428233f73fc6f1dddf3a50025e789b93b6e2 /Source
parent826f1448b838bc3efadf2f1cc93e614426e104dd (diff)
downloadswig-9f0b9da024696c19573f0566adceea277e36f0cd.tar.gz
Always use fastunpack for Python swigregister function
Diffstat (limited to 'Source')
-rwxr-xr-xSource/Modules/python.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index 7c9603a3d..9eb233e9e 100755
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -4510,16 +4510,12 @@ public:
} else {
Printv(f_wrappers, "SWIGINTERN PyObject *", class_name, "_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {\n", NIL);
Printv(f_wrappers, " PyObject *obj;\n", NIL);
- if (fastunpack) {
- Printv(f_wrappers, " if (!SWIG_Python_UnpackTuple(args, \"swigregister\", 1, 1, &obj)) return NULL;\n", NIL);
- } else {
- Printv(f_wrappers, " if (!PyArg_UnpackTuple(args, \"swigregister\", 1, 1, &obj)) return NULL;\n", NIL);
- }
+ Printv(f_wrappers, " if (!SWIG_Python_UnpackTuple(args, \"swigregister\", 1, 1, &obj)) return NULL;\n", NIL);
Printv(f_wrappers,
" SWIG_TypeNewClientData(SWIGTYPE", SwigType_manglestr(ct), ", SWIG_NewClientData(obj));\n", " return SWIG_Py_Void();\n", "}\n\n", NIL);
String *cname = NewStringf("%s_swigregister", class_name);
- add_method(cname, cname, 0);
+ add_method(cname, cname, 0, 0, 1, 1, 1);
Delete(cname);
}
Delete(smart);