diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-10-30 15:13:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 15:13:17 +0100 |
commit | 9204fb8623896cc5f68ae350784ee25e8a7b2184 (patch) | |
tree | 2f36a952c747107714dc3ce700eeeabb6f4e6560 /Python/ceval.c | |
parent | 3c09dca4b5de9fe8c8756251d02f49cf093b88c1 (diff) | |
download | cpython-git-9204fb8623896cc5f68ae350784ee25e8a7b2184.tar.gz |
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
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 9a96dc7b37..6443123848 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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 |