We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyTuple_SetItem
1 parent 1fe7701 commit 997f929Copy full SHA for 997f929
Doc/c-api/tuple.rst
@@ -105,6 +105,12 @@ Tuple Objects
105
is being replaced; any reference in the tuple at position *pos* will be
106
leaked.
107
108
+ .. warning::
109
+
110
+ This macro should *only* be used on tuples that are newly created.
111
+ Using this macro on a tuple that is already in use (or in other words, has
112
+ a refcount > 1) could lead to undefined behavior.
113
114
115
.. c:function:: int _PyTuple_Resize(PyObject **p, Py_ssize_t newsize)
116
0 commit comments