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

@ -604,8 +604,8 @@ Return number of occurrences of value.
[clinic start generated code]*/
static PyObject *
tuple_count(PyTupleObject *self, PyObject *value)
/*[clinic end generated code: output=aa927affc5a97605 input=531721aff65bd772]*/
tuple_count_impl(PyTupleObject *self, PyObject *value)
/*[clinic end generated code: output=cf02888d4bc15d7a input=531721aff65bd772]*/
{
Py_ssize_t count = 0;
Py_ssize_t i;