mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
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:
parent
de6f38db48
commit
60ac6ed557
16 changed files with 95 additions and 86 deletions
|
@ -47,7 +47,7 @@ PyStructSequence_New(PyTypeObject *type)
|
|||
return NULL;
|
||||
/* Hack the size of the variable object, so invisible fields don't appear
|
||||
to Python code. */
|
||||
Py_SIZE(obj) = VISIBLE_SIZE_TP(type);
|
||||
Py_SET_SIZE(obj, VISIBLE_SIZE_TP(type));
|
||||
for (i = 0; i < size; i++)
|
||||
obj->ob_item[i] = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue