commit | b10dc3e7a11fcdb97e285882eba6da92594f90f9 | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Fri Feb 07 12:05:12 2020 +0100 |
committer | GitHub <noreply@github.com> | Fri Feb 07 12:05:12 2020 +0100 |
tree | 6c304386f0a2be9d0d6213cbb45b3ff78f60b040 | |
parent | 877ea88934a5164be4d9f15207694fad4173d87d [diff] [blame] |
bpo-39573: Add Py_SET_SIZE() function (GH-18400) Add Py_SET_SIZE() function to set the size of an object.
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 @@ return (PyVarObject *) PyErr_NoMemory(); } - Py_SIZE(op) = size; + Py_SET_SIZE(op, size); PyObject_Init((PyObject *)op, tp); return op; }