diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-07 11:05:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 11:05:12 (GMT) |
commit | b10dc3e7a11fcdb97e285882eba6da92594f90f9 (patch) | |
tree | 6c304386f0a2be9d0d6213cbb45b3ff78f60b040 /Doc | |
parent | 877ea88934a5164be4d9f15207694fad4173d87d (diff) | |
download | cpython-b10dc3e7a11fcdb97e285882eba6da92594f90f9.zip cpython-b10dc3e7a11fcdb97e285882eba6da92594f90f9.tar.gz cpython-b10dc3e7a11fcdb97e285882eba6da92594f90f9.tar.bz2 |
bpo-39573: Add Py_SET_SIZE() function (GH-18400)
Add Py_SET_SIZE() function to set the size of an object.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/structures.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 8a1431c..75e2383 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -101,6 +101,13 @@ the definition of all other Python objects. (((PyVarObject*)(o))->ob_size) +.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size) + + Set the object *o* size of *size*. + + .. versionadded:: 3.9 + + .. c:macro:: PyObject_HEAD_INIT(type) This is a macro which expands to initialization values for a new |