mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-39573: Add Py_SET_SIZE() function (GH-18400)
Add Py_SET_SIZE() function to set the size of an object.
This commit is contained in:
parent
877ea88934
commit
b10dc3e7a1
5 changed files with 15 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue