summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/python/pyrun.swg14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
index d42dc0f0f..2aef3ad0f 100644
--- a/Lib/python/pyrun.swg
+++ b/Lib/python/pyrun.swg
@@ -1627,19 +1627,19 @@ SWIG_Python_TypeCache(void) {
SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
+#ifdef SWIG_LINK_RUNTIME
static void *type_pointer = (void *)0;
/* first check if module already created */
if (!type_pointer) {
-#ifdef SWIG_LINK_RUNTIME
type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
+ }
#else
- type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
- if (PyErr_Occurred()) {
- PyErr_Clear();
- type_pointer = (void *)0;
- }
-#endif
+ void *type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
+ if (PyErr_Occurred()) {
+ PyErr_Clear();
+ type_pointer = (void *)0;
}
+#endif
return (swig_module_info *) type_pointer;
}