diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 12:14:46 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 12:14:46 +0200 |
commit | f0ba8f8e86075600cfa41ce2db1217c6fac0ffb6 (patch) | |
tree | 111a8e9c8b5481e1cedae8efc7e8b1c661031b95 /Python/errors.c | |
parent | c53bc68d210da590ac308372f89f415cc406aa7a (diff) | |
parent | 5d858465b6ebdafa05f86309457848cc26913b6a (diff) | |
download | cpython-f0ba8f8e86075600cfa41ce2db1217c6fac0ffb6.tar.gz |
Issue #19569: Suggested more appropriate replacements for deprecated Unicode
C API functions.
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c index 7b25a2202c..1463cdca3f 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; } |