diff options
author | Jose <jose@zeroc.com> | 2017-03-27 16:28:51 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-03-27 16:28:51 +0200 |
commit | 16f2cd2298ecfe418d3072c0243c93854e8a810e (patch) | |
tree | 0e6a85fa72227a1a7240f4c6314b9d41b69df658 /python/modules | |
parent | Fixed (ICE-6996) - Python tests warnings when running with python_d debug int... (diff) | |
download | ice-16f2cd2298ecfe418d3072c0243c93854e8a810e.tar.bz2 ice-16f2cd2298ecfe418d3072c0243c93854e8a810e.tar.xz ice-16f2cd2298ecfe418d3072c0243c93854e8a810e.zip |
Fixed (ICE-7709) - Python memory allocator called without holding the GIL
Diffstat (limited to 'python/modules')
-rw-r--r-- | python/modules/IcePy/Proxy.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp index 2186cef5bc3..e2121d5e252 100644 --- a/python/modules/IcePy/Proxy.cpp +++ b/python/modules/IcePy/Proxy.cpp @@ -2278,20 +2278,17 @@ checkedCastImpl(ProxyObject* p, const string& id, PyObject* facet, PyObject* ctx bool b = false; try { - AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. - if(!ctx || ctx == Py_None) - { - b = target->ice_isA(id); - } - else + Ice::Context c = ::Ice::noExplicitContext; + if(ctx && ctx != Py_None) { - Ice::Context c; if(!dictionaryToContext(ctx, c)) { return 0; } - b = target->ice_isA(id, c); } + + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + b = target->ice_isA(id, c); } catch(const Ice::FacetNotExistException&) { |