summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-11-14 17:51:51 -0800
committerSteve Dower <steve.dower@microsoft.com>2016-11-14 17:51:51 -0800
commitb590494b063647a2e52c16d6067b78f528ada3ea (patch)
treeecc780d00a40e5dd33bb2241b275cca230c7c0c2 /Python/errors.c
parent109c5479d5dd1ad9fc68484f81b5e27e05b25abc (diff)
parentb0cab52302974c2cf0c710cbb02910c29ea9769f (diff)
downloadcpython-b590494b063647a2e52c16d6067b78f528ada3ea.tar.gz
Issue #28573: Fixes issue with nested if blocks
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;
}