| 326 | // bpo-39947 added PyInterpreterState_Get() to Python 3.9.0a5 |
| 327 | #if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION) |
| 328 | static inline PyInterpreterState* PyInterpreterState_Get(void) |
| 329 | { |
| 330 | PyThreadState *tstate; |
| 331 | PyInterpreterState *interp; |
| 332 | |
| 333 | tstate = PyThreadState_GET(); |
| 334 | if (tstate == _Py_NULL) { |
| 335 | Py_FatalError("GIL released (tstate is NULL)"); |
| 336 | } |
| 337 | interp = tstate->interp; |
| 338 | if (interp == _Py_NULL) { |
| 339 | Py_FatalError("no current interpreter"); |
| 340 | } |
| 341 | return interp; |
| 342 | } |
| 343 | #endif |
| 344 | |
| 345 |
nothing calls this directly
no outgoing calls
no test coverage detected