diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2018-12-04 20:12:42 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-12-04 20:12:42 +0000 |
commit | 9fe2b05faa349463447284186947a9398f0ad557 (patch) | |
tree | e9f4bb33027efe699485e922fca7dbc809ee022e /Lib/python | |
parent | 9a7e2ed9ed29b3e14c7f28c4b6b327e529e05aca (diff) | |
parent | 402d55da521f86867ea34414181a19994c82988a (diff) | |
download | swig-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.swg | 5 |
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(); |