summaryrefslogtreecommitdiff
path: root/Lib/python
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2018-12-04 20:12:42 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2018-12-04 20:12:42 +0000
commit9fe2b05faa349463447284186947a9398f0ad557 (patch)
treee9f4bb33027efe699485e922fca7dbc809ee022e /Lib/python
parent9a7e2ed9ed29b3e14c7f28c4b6b327e529e05aca (diff)
parent402d55da521f86867ea34414181a19994c82988a (diff)
downloadswig-9fe2b05faa349463447284186947a9398f0ad557.tar.gz
Merge branch 'adr26-master'
* adr26-master: Cleanup accessing/decref of globals, to avoid code bloat in init function. Fix ISOC build errors. Fix unused variable warning. #1360: Leak of SWIG var link object Conflicts: CHANGES.current
Diffstat (limited to 'Lib/python')
-rw-r--r--Lib/python/pyinit.swg5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg
index 621d6f9ed..d8f3bf444 100644
--- a/Lib/python/pyinit.swg
+++ b/Lib/python/pyinit.swg
@@ -326,7 +326,8 @@ SWIGEXPORT
void
#endif
SWIG_init(void) {
- PyObject *m, *d, *md;
+ PyObject *m, *d, *md, *globals;
+
#if PY_VERSION_HEX >= 0x03000000
static struct PyModuleDef SWIG_module = {
PyModuleDef_HEAD_INIT,
@@ -379,6 +380,8 @@ SWIG_init(void) {
assert(metatype);
#endif
+ (void)globals;
+
/* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
SWIG_This();
SWIG_Python_TypeCache();