GH-145247: Use _PyTuple_FromPair in Parser and Python (#145842)

Use _PyTuple_FromPair in Parser and Python
This commit is contained in:
Sergey Miryanov 2026-03-12 02:08:18 +05:00 committed by GitHub
parent f062014d38
commit d19de375a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 16 additions and 11 deletions

View file

@ -3341,7 +3341,7 @@ zip_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
if (lz->strict) {
return PyTuple_Pack(3, Py_TYPE(lz), lz->ittuple, Py_True);
}
return PyTuple_Pack(2, Py_TYPE(lz), lz->ittuple);
return _PyTuple_FromPair((PyObject *)Py_TYPE(lz), lz->ittuple);
}
static PyObject *