mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Use PyThreadState_GET() in performance critical code
It seems like _PyThreadState_UncheckedGet() is not inlined as expected, even when using gcc -O3.
This commit is contained in:
parent
7255edd3df
commit
0cae609847
3 changed files with 4 additions and 3 deletions
|
@ -1547,8 +1547,9 @@ error:
|
|||
Py_XDECREF(name);
|
||||
Py_XDECREF(value);
|
||||
/* No return value, therefore clear error state if possible */
|
||||
if (_PyThreadState_UncheckedGet())
|
||||
if (_PyThreadState_UncheckedGet()) {
|
||||
PyErr_Clear();
|
||||
}
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue