gh-111178: Generate correct signature for most self converters (#128447)

This commit is contained in:
Erlend E. Aasland 2025-01-20 12:40:18 +01:00 committed by GitHub
parent 4d0a6595a0
commit 537296cdcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 1627 additions and 1631 deletions

View file

@ -1557,7 +1557,7 @@ array_array_fromfile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f,
not_enough_bytes = (PyBytes_GET_SIZE(b) != nbytes);
res = array_array_frombytes(self, b);
res = array_array_frombytes((PyObject *)self, b);
Py_DECREF(b);
if (res == NULL)
return NULL;
@ -2797,8 +2797,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
else if (initial != NULL && (PyByteArray_Check(initial) ||
PyBytes_Check(initial))) {
PyObject *v;
v = array_array_frombytes((arrayobject *)a,
initial);
v = array_array_frombytes((PyObject *)a, initial);
if (v == NULL) {
Py_DECREF(a);
return NULL;