diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-07 12:05:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 12:05:12 +0100 |
commit | b10dc3e7a11fcdb97e285882eba6da92594f90f9 (patch) | |
tree | 6c304386f0a2be9d0d6213cbb45b3ff78f60b040 /Include/cpython/objimpl.h | |
parent | 877ea88934a5164be4d9f15207694fad4173d87d (diff) | |
download | cpython-git-b10dc3e7a11fcdb97e285882eba6da92594f90f9.tar.gz |
bpo-39573: Add Py_SET_SIZE() function (GH-18400)
Add Py_SET_SIZE() function to set the size of an object.
Diffstat (limited to 'Include/cpython/objimpl.h')
-rw-r--r-- | Include/cpython/objimpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/objimpl.h b/Include/cpython/objimpl.h index ebb3e234e3..8e3c964cf4 100644 --- a/Include/cpython/objimpl.h +++ b/Include/cpython/objimpl.h @@ -30,7 +30,7 @@ static inline PyVarObject* _PyObject_INIT_VAR(PyVarObject *op, PyTypeObject *typeobj, Py_ssize_t size) { assert(op != NULL); - Py_SIZE(op) = size; + Py_SET_SIZE(op, size); PyObject_INIT((PyObject *)op, typeobj); return op; } |