summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-15 09:12:36 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-11-15 09:12:36 +0100
commitbf24ffc881140856d7f72f3161119fcda29cc4cc (patch)
treec1bb0d606a64ef099ba8ac77640b1ffd2c8a6ab4 /Python/errors.c
parentda22e7f2daa3cdcae574441f05526e8231a8ad3b (diff)
parentb590494b063647a2e52c16d6067b78f528ada3ea (diff)
downloadcpython-bf24ffc881140856d7f72f3161119fcda29cc4cc.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;
}