mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
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:
parent
4162bc133b
commit
9d759b63d8
66 changed files with 843 additions and 190 deletions
|
|
@ -929,8 +929,8 @@ Return a copy of the array.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
array_array___deepcopy__(arrayobject *self, PyObject *unused)
|
||||
/*[clinic end generated code: output=1ec748d8e14a9faa input=2405ecb4933748c4]*/
|
||||
array_array___deepcopy___impl(arrayobject *self, PyObject *unused)
|
||||
/*[clinic end generated code: output=703b4c412feaaf31 input=2405ecb4933748c4]*/
|
||||
{
|
||||
return array_array___copy___impl(self);
|
||||
}
|
||||
|
|
@ -1174,8 +1174,8 @@ Return number of occurrences of v in the array.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
array_array_count(arrayobject *self, PyObject *v)
|
||||
/*[clinic end generated code: output=3dd3624bf7135a3a input=d9bce9d65e39d1f5]*/
|
||||
array_array_count_impl(arrayobject *self, PyObject *v)
|
||||
/*[clinic end generated code: output=93ead26a2affb739 input=d9bce9d65e39d1f5]*/
|
||||
{
|
||||
Py_ssize_t count = 0;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1272,8 +1272,8 @@ Remove the first occurrence of v in the array.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
array_array_remove(arrayobject *self, PyObject *v)
|
||||
/*[clinic end generated code: output=bef06be9fdf9dceb input=0b1e5aed25590027]*/
|
||||
array_array_remove_impl(arrayobject *self, PyObject *v)
|
||||
/*[clinic end generated code: output=f2a24e288ecb2a35 input=0b1e5aed25590027]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
|
||||
|
|
@ -1420,8 +1420,8 @@ Append new value v to the end of the array.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
array_array_append(arrayobject *self, PyObject *v)
|
||||
/*[clinic end generated code: output=745a0669bf8db0e2 input=0b98d9d78e78f0fa]*/
|
||||
array_array_append_impl(arrayobject *self, PyObject *v)
|
||||
/*[clinic end generated code: output=2f1e8cbad70c2a8b input=0b98d9d78e78f0fa]*/
|
||||
{
|
||||
return ins(self, Py_SIZE(self), v);
|
||||
}
|
||||
|
|
@ -1642,8 +1642,8 @@ Append items to array from list.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
array_array_fromlist(arrayobject *self, PyObject *list)
|
||||
/*[clinic end generated code: output=26411c2d228a3e3f input=be2605a96c49680f]*/
|
||||
array_array_fromlist_impl(arrayobject *self, PyObject *list)
|
||||
/*[clinic end generated code: output=6c23733a68dd68df input=be2605a96c49680f]*/
|
||||
{
|
||||
Py_ssize_t n;
|
||||
|
||||
|
|
@ -3102,8 +3102,8 @@ Set state information for unpickling.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
array_arrayiterator___setstate__(arrayiterobject *self, PyObject *state)
|
||||
/*[clinic end generated code: output=397da9904e443cbe input=f47d5ceda19e787b]*/
|
||||
array_arrayiterator___setstate___impl(arrayiterobject *self, PyObject *state)
|
||||
/*[clinic end generated code: output=d7837ae4ac1fd8b9 input=f47d5ceda19e787b]*/
|
||||
{
|
||||
Py_ssize_t index = PyLong_AsSsize_t(state);
|
||||
if (index == -1 && PyErr_Occurred())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue