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 /Objects | |
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 'Objects')
-rw-r--r-- | Objects/object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c index ff6c497..81de3b8 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -160,7 +160,7 @@ PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, Py_ssize_t size) return (PyVarObject *) PyErr_NoMemory(); } - Py_SIZE(op) = size; + Py_SET_SIZE(op, size); PyObject_Init((PyObject *)op, tp); return op; } |