summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-30 14:13:17 (GMT)
committerGitHub <noreply@github.com>2018-10-30 14:13:17 (GMT)
commit9204fb8623896cc5f68ae350784ee25e8a7b2184 (patch)
tree2f36a952c747107714dc3ce700eeeabb6f4e6560 /Objects
parent3c09dca4b5de9fe8c8756251d02f49cf093b88c1 (diff)
downloadcpython-9204fb8623896cc5f68ae350784ee25e8a7b2184.zip
cpython-9204fb8623896cc5f68ae350784ee25e8a7b2184.tar.gz
cpython-9204fb8623896cc5f68ae350784ee25e8a7b2184.tar.bz2
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 'Objects')
-rw-r--r--Objects/dictobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index ee65695..363d902 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1314,8 +1314,8 @@ PyDict_GetItem(PyObject *op, PyObject *key)
/* We can arrive here with a NULL tstate during initialization: try
running "python -Wi" for an example related to string interning.
Let's just hope that no exception occurs then... This must be
- _PyThreadState_Current and not PyThreadState_GET() because in debug
- mode, the latter complains if tstate is NULL. */
+ PyThreadState_GET() and not PyThreadState_Get() because the latter
+ abort Python if tstate is NULL. */
tstate = PyThreadState_GET();
if (tstate != NULL && tstate->curexc_type != NULL) {
/* preserve the existing exception */