mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
gh-90667: Add specializations of Py_DECREF when types are known (GH-30872)
This commit is contained in:
parent
ab0d35d70d
commit
da6c78584b
13 changed files with 147 additions and 85 deletions
|
@ -2511,7 +2511,7 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
|
|||
}
|
||||
if (PyFloat_CheckExact(item)) {
|
||||
f_result += PyFloat_AS_DOUBLE(item);
|
||||
Py_DECREF(item);
|
||||
_Py_DECREF_SPECIALIZED(item, _PyFloat_ExactDealloc);
|
||||
continue;
|
||||
}
|
||||
if (PyLong_Check(item)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue