bpo-39573: Use Py_SET_SIZE() function (GH-18402)

Replace direct acccess to PyVarObject.ob_size with usage of
the Py_SET_SIZE() function.
This commit is contained in:
Victor Stinner 2020-02-07 23:18:08 +01:00 committed by GitHub
parent de6f38db48
commit 60ac6ed557
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 95 additions and 86 deletions

View file

@ -4436,7 +4436,7 @@ unpack_iterable(PyThreadState *tstate, PyObject *v,
*--sp = PyList_GET_ITEM(l, ll - j);
}
/* Resize the list. */
Py_SIZE(l) = ll - argcntafter;
Py_SET_SIZE(l, ll - argcntafter);
Py_DECREF(it);
return 1;