diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-11-11 01:43:56 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-11-11 01:43:56 +0100 |
commit | bc2f49454c330a83373e1f00c3de717dad4070ef (patch) | |
tree | 7906a7fbec8c193de57c9abc8ab0f8001e881fae /Python/errors.c | |
parent | 8f660d1ae6c38ca4fa6e3bdf15595dac1eebf01d (diff) | |
download | cpython-bc2f49454c330a83373e1f00c3de717dad4070ef.tar.gz |
Use PyThreadState_GET() in performance critical code
It seems like _PyThreadState_UncheckedGet() is not inlined as expected, even
when using gcc -O3.
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index 918f4dffab..0c38f7cf0c 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -161,7 +161,7 @@ PyErr_SetString(PyObject *exception, const char *string) PyObject * PyErr_Occurred(void) { - PyThreadState *tstate = _PyThreadState_UncheckedGet(); + PyThreadState *tstate = PyThreadState_GET(); return tstate == NULL ? NULL : tstate->curexc_type; } |