gh-111178: Change Argument Clinic signature for METH_O (#130682)

Use "PyObject*" for METH_O functions to fix an undefined behavior.
This commit is contained in:
Victor Stinner 2025-03-11 16:33:36 +01:00 committed by GitHub
parent 4162bc133b
commit 9d759b63d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 843 additions and 190 deletions

View file

@ -1883,8 +1883,8 @@ Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.
[clinic start generated code]*/
static PyObject *
bytes_join(PyBytesObject *self, PyObject *iterable_of_bytes)
/*[clinic end generated code: output=a046f379f626f6f8 input=7fe377b95bd549d2]*/
bytes_join_impl(PyBytesObject *self, PyObject *iterable_of_bytes)
/*[clinic end generated code: output=0687abb94d7d438e input=7fe377b95bd549d2]*/
{
return stringlib_bytes_join((PyObject*)self, iterable_of_bytes);
}