mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
continue to use PyEval_GetBuiltins for PyPy
This commit is contained in:
parent
f4e6c7833e
commit
cc03a56512
@ -423,7 +423,7 @@ PYBIND11_NOINLINE internals &get_internals() {
|
||||
str id(id_cstr);
|
||||
|
||||
dict state_dict;
|
||||
#if PY_VERSION_HEX < 0x03080000
|
||||
#if PY_VERSION_HEX < 0x03080000 || defined(PYPY_VERSION)
|
||||
state_dict = reinterpret_borrow<dict>(PyEval_GetBuiltins());
|
||||
#elif PY_VERSION_HEX < 0x03090000
|
||||
state_dict = reinterpret_borrow<dict>(PyInterpreterState_GetDict(_PyInterpreterState_Get()));
|
||||
|
@ -170,7 +170,7 @@ TEST_CASE("There can be only one interpreter") {
|
||||
|
||||
bool has_pybind11_internals_builtin() {
|
||||
py::dict state_dict;
|
||||
#if PY_VERSION_HEX < 0x03080000
|
||||
#if PY_VERSION_HEX < 0x03080000 || defined(PYPY_VERSION)
|
||||
state_dict = py::reinterpret_borrow<py::dict>(PyEval_GetBuiltins());
|
||||
#elif PY_VERSION_HEX < 0x03090000
|
||||
state_dict
|
||||
|
Loading…
Reference in New Issue
Block a user