mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
GH-117283: Add doc warning for PyTuple_SetItem refcount > 1 (#117916)
This commit is contained in:
parent
3b26cd8ca0
commit
041a566f3f
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue