gh-111489: Remove _PyTuple_FromArray() alias (#139973)

Replace _PyTuple_FromArray() with PyTuple_FromArray().
Remove pycore_tuple.h includes.
This commit is contained in:
Victor Stinner 2025-10-11 22:58:14 +02:00 committed by GitHub
parent 447c7a89fb
commit 166cdaa6fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 63 additions and 74 deletions

View file

@ -12,7 +12,7 @@
#include "pycore_modsupport.h" // _PyArg_NoPositional()
#include "pycore_object.h" // _PyObject_GC_TRACK()
#include "pycore_structseq.h" // PyStructSequence_InitType()
#include "pycore_tuple.h" // _PyTuple_FromArray()
#include "pycore_tuple.h" // _PyTuple_RESET_HASH_CACHE()
#include "pycore_typeobject.h" // _PyStaticType_FiniBuiltin()
static const char visible_length_key[] = "n_sequence_fields";
@ -353,7 +353,7 @@ structseq_reduce(PyObject *op, PyObject *Py_UNUSED(ignored))
if (n_unnamed_fields < 0) {
return NULL;
}
tup = _PyTuple_FromArray(self->ob_item, n_visible_fields);
tup = PyTuple_FromArray(self->ob_item, n_visible_fields);
if (!tup)
goto error;