| 142 | inline void translate_exception(std::exception_ptr p); |
| 143 | |
| 144 | inline PyThreadState *get_thread_state_unchecked() { |
| 145 | #if defined(PYPY_VERSION) || defined(GRAALVM_PYTHON) |
| 146 | return PyThreadState_GET(); |
| 147 | #elif PY_VERSION_HEX < 0x030D0000 |
| 148 | return _PyThreadState_UncheckedGet(); |
| 149 | #else |
| 150 | return PyThreadState_GetUnchecked(); |
| 151 | #endif |
| 152 | } |
| 153 | |
| 154 | inline PyInterpreterState *get_interpreter_state_unchecked() { |
| 155 | auto *tstate = get_thread_state_unchecked(); |
no outgoing calls