From 63b7719c22f71204b2d5f0f44761c2d1576f3f18 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 3 Dec 2018 11:38:11 +0100 Subject: [PATCH] Update pybind11, remove evil hack --- external_dependencies/pybind11 | 2 +- libsrc/general/ngpython.hpp | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/external_dependencies/pybind11 b/external_dependencies/pybind11 index 2a150736..e2b884c3 160000 --- a/external_dependencies/pybind11 +++ b/external_dependencies/pybind11 @@ -1 +1 @@ -Subproject commit 2a150736601bb3113877bb673fb934bb60d46ec5 +Subproject commit e2b884c33bcde70b2ea562ffa52dd7ebee276d50 diff --git a/libsrc/general/ngpython.hpp b/libsrc/general/ngpython.hpp index dacbb822..fa9862b1 100644 --- a/libsrc/general/ngpython.hpp +++ b/libsrc/general/ngpython.hpp @@ -1,28 +1,5 @@ #ifdef NG_PYTHON -// BEGIN EVIL HACK: Patch PyThread_get_key_value/PyThread_tss_get inside pybind11 to avoid deadlocks -// see https://github.com/pybind/pybind11/pull/1211 (please merge!) -#if defined(__GNUG__) && !defined(__clang__) -# pragma GCC diagnostic ignored "-Wattributes" -#endif -#include -#include -#include -#undef PYBIND11_TLS_GET_VALUE -#if PY_VERSION_HEX >= 0x03070000 - inline void * PYBIND11_TLS_GET_VALUE(Py_tss_t *state) { - PyThreadState *tstate = (PyThreadState *) PyThread_tss_get(state); - if (!tstate) tstate = PyGILState_GetThisThreadState(); - return tstate; - } -#else - inline void * PYBIND11_TLS_GET_VALUE(int state) { - PyThreadState *tstate = (PyThreadState *) PyThread_get_key_value(state); - if (!tstate) tstate = PyGILState_GetThisThreadState(); - return tstate; - } -#endif -// END EVIL HACK #include #include #include