mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-35081: Cleanup pystate.c and pystate.h (GH-10240)
* Remove _PyThreadState_Current * Replace GET_TSTATE() with PyThreadState_GET() * Replace GET_INTERP_STATE() with _PyInterpreterState_GET_UNSAFE() * Replace direct access to _PyThreadState_Current with PyThreadState_GET() * Replace _PyThreadState_Current with _PyRuntime.gilstate.tstate_current * Rename SET_TSTATE() to _PyThreadState_SET(), name more consistent with _PyThreadState_GET() * Update outdated comments
This commit is contained in:
parent
3c09dca4b5
commit
9204fb8623
4 changed files with 26 additions and 31 deletions
|
@ -188,8 +188,7 @@ PyEval_ReleaseLock(void)
|
|||
We therefore avoid PyThreadState_GET() which dumps a fatal error
|
||||
in debug mode.
|
||||
*/
|
||||
drop_gil((PyThreadState*)_Py_atomic_load_relaxed(
|
||||
&_PyThreadState_Current));
|
||||
drop_gil(PyThreadState_GET());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue