mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +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
|
|
@ -484,7 +484,7 @@ deque_extend_impl(dequeobject *deque, PyObject *iterable)
|
|||
PyObject *s = PySequence_List(iterable);
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
result = deque_extend(deque, s);
|
||||
result = deque_extend((PyObject*)deque, s);
|
||||
Py_DECREF(s);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -578,7 +578,7 @@ deque_inplace_concat(PyObject *self, PyObject *other)
|
|||
PyObject *result;
|
||||
|
||||
// deque_extend is thread-safe
|
||||
result = deque_extend(deque, other);
|
||||
result = deque_extend((PyObject*)deque, other);
|
||||
if (result == NULL)
|
||||
return result;
|
||||
Py_INCREF(deque);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue