summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-03-21 21:17:21 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-03-21 21:17:21 +0000
commit39599f2112004dc1aff1df8d1ff15ededbecdb4c (patch)
treeec6cf03d70b2153e0f12e612bf22a31a28cd9d81 /Source
parent9f0b9da024696c19573f0566adceea277e36f0cd (diff)
downloadswig-39599f2112004dc1aff1df8d1ff15ededbecdb4c.tar.gz
Always use fastunpack for Python swigconstant wrappers
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 9eb233e9e..b8493352c 100755
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -3592,11 +3592,7 @@ public:
Printf(f_wrappers, "SWIGINTERN PyObject *%s_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {\n", iname);
Printf(f_wrappers, tab2 "PyObject *module;\n", tm);
Printf(f_wrappers, tab2 "PyObject *d;\n");
- if (fastunpack) {
- Printf(f_wrappers, tab2 "if (!SWIG_Python_UnpackTuple(args, \"swigconstant\", 1, 1, &module)) return NULL;\n");
- } else {
- Printf(f_wrappers, tab2 "if (!PyArg_UnpackTuple(args, \"swigconstant\", 1, 1, &module)) return NULL;\n");
- }
+ Printf(f_wrappers, tab2 "if (!SWIG_Python_UnpackTuple(args, \"swigconstant\", 1, 1, &module)) return NULL;\n");
Printf(f_wrappers, tab2 "d = PyModule_GetDict(module);\n");
Printf(f_wrappers, tab2 "if (!d) return NULL;\n");
Printf(f_wrappers, tab2 "%s\n", tm);
@@ -3605,7 +3601,7 @@ public:
// Register the method in SwigMethods array
String *cname = NewStringf("%s_swigconstant", iname);
- add_method(cname, cname, 0);
+ add_method(cname, cname, 0, 0, 1, 1, 1);
Delete(cname);
} else {
Printf(f_init, "%s\n", tm);