mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-23 13:45:10 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
4985156a3e
@ -468,9 +468,6 @@ PYBIND11_NOINLINE internals &get_internals() {
|
|||||||
internals_ptr = new internals();
|
internals_ptr = new internals();
|
||||||
#if defined(WITH_THREAD)
|
#if defined(WITH_THREAD)
|
||||||
|
|
||||||
# if PY_VERSION_HEX < 0x03090000
|
|
||||||
PyEval_InitThreads();
|
|
||||||
# endif
|
|
||||||
PyThreadState *tstate = PyThreadState_Get();
|
PyThreadState *tstate = PyThreadState_Get();
|
||||||
if (!PYBIND11_TLS_KEY_CREATE(internals_ptr->tstate)) {
|
if (!PYBIND11_TLS_KEY_CREATE(internals_ptr->tstate)) {
|
||||||
pybind11_fail("get_internals: could not successfully initialize the tstate TSS key!");
|
pybind11_fail("get_internals: could not successfully initialize the tstate TSS key!");
|
||||||
|
@ -118,6 +118,9 @@ inline void initialize_interpreter(bool init_signal_handlers = true,
|
|||||||
#if PY_VERSION_HEX < 0x030B0000
|
#if PY_VERSION_HEX < 0x030B0000
|
||||||
|
|
||||||
Py_InitializeEx(init_signal_handlers ? 1 : 0);
|
Py_InitializeEx(init_signal_handlers ? 1 : 0);
|
||||||
|
# if defined(WITH_THREAD) && PY_VERSION_HEX < 0x03070000
|
||||||
|
PyEval_InitThreads();
|
||||||
|
# endif
|
||||||
|
|
||||||
// Before it was special-cased in python 3.8, passing an empty or null argv
|
// Before it was special-cased in python 3.8, passing an empty or null argv
|
||||||
// caused a segfault, so we have to reimplement the special case ourselves.
|
// caused a segfault, so we have to reimplement the special case ourselves.
|
||||||
|
Loading…
Reference in New Issue
Block a user