mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-17 06:00:51 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
97897301c1
@ -324,8 +324,8 @@ PYBIND11_WARNING_POP
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// See description of PR #4246:
|
// See description of PR #4246:
|
||||||
#if !defined(NDEBUG) && !defined(PY_ASSERT_GIL_HELD_INCREF_DECREF) && !defined(PYPY_VERSION) \
|
#if !defined(PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF) && !defined(NDEBUG) \
|
||||||
&& !defined(PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF)
|
&& !defined(PYPY_VERSION) && !defined(PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF)
|
||||||
# define PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
|
# define PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -303,7 +303,12 @@ private:
|
|||||||
stderr,
|
stderr,
|
||||||
"%s is being called while the GIL is either not held or invalid. Please see "
|
"%s is being called while the GIL is either not held or invalid. Please see "
|
||||||
"https://pybind11.readthedocs.io/en/stable/advanced/"
|
"https://pybind11.readthedocs.io/en/stable/advanced/"
|
||||||
"misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.\n",
|
"misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.\n"
|
||||||
|
"If you are convinced there is no bug in your code, you can #define "
|
||||||
|
"PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF"
|
||||||
|
"to disable this check. In that case you have to ensure this #define is consistently "
|
||||||
|
"used for all translation units linked into a given pybind11 extension, otherwise "
|
||||||
|
"there will be ODR violations.",
|
||||||
function_name.c_str());
|
function_name.c_str());
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
if (Py_TYPE(m_ptr)->tp_name != nullptr) {
|
if (Py_TYPE(m_ptr)->tp_name != nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user