mirror of
https://github.com/python/cpython
synced 2024-09-06 02:18:37 +00:00
GH-117283: Add doc warning for PyTuple_SetItem
refcount > 1 (#117916)
This commit is contained in:
parent
3b26cd8ca0
commit
041a566f3f
|
@ -105,6 +105,12 @@ Tuple Objects
|
|||
is being replaced; any reference in the tuple at position *pos* will be
|
||||
leaked.
|
||||
|
||||
.. warning::
|
||||
|
||||
This macro should *only* be used on tuples that are newly created.
|
||||
Using this macro on a tuple that is already in use (or in other words, has
|
||||
a refcount > 1) could lead to undefined behavior.
|
||||
|
||||
|
||||
.. c:function:: int _PyTuple_Resize(PyObject **p, Py_ssize_t newsize)
|
||||
|
||||
|
|
Loading…
Reference in a new issue