MCPcopy Create free account
hub / github.com/pybind/pybind11 / get_thread_state_unchecked

Function get_thread_state_unchecked

include/pybind11/detail/internals.h:144–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142inline void translate_exception(std::exception_ptr p);
143
144inline 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
154inline PyInterpreterState *get_interpreter_state_unchecked() {
155 auto *tstate = get_thread_state_unchecked();

Callers 7

TEST_SUBMODULEFunction · 0.85
gil_scoped_acquireMethod · 0.85
dec_refMethod · 0.85
get_ppMethod · 0.85
destroyMethod · 0.85

Calls

no outgoing calls

Tested by 1

TEST_SUBMODULEFunction · 0.68