summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-14 12:39:05 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-11-14 12:39:05 +0100
commit8d81c64f9cbe75de79041b86141749642da98a55 (patch)
treeec7ee17a31f3cc7fb48db25434c9e99dd776b34e /Python/errors.c
parentcd20b88a791a24efac2b77d06987e90d4d590260 (diff)
parent13f2c5df732d200c2000299fb141e211200f39f6 (diff)
downloadcpython-8d81c64f9cbe75de79041b86141749642da98a55.tar.gz
Merge 3.6
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 918f4dffab..d459fae622 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -158,10 +158,10 @@ PyErr_SetString(PyObject *exception, const char *string)
}
-PyObject *
+PyObject* _Py_HOT_FUNCTION
PyErr_Occurred(void)
{
- PyThreadState *tstate = _PyThreadState_UncheckedGet();
+ PyThreadState *tstate = PyThreadState_GET();
return tstate == NULL ? NULL : tstate->curexc_type;
}