mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -3253,9 +3253,9 @@ dec_as_long(PyObject *dec, PyObject *context, int round)
|
|||
i--;
|
||||
}
|
||||
|
||||
Py_SIZE(pylong) = i;
|
||||
Py_SET_SIZE(pylong, i);
|
||||
if (mpd_isnegative(x) && !mpd_iszero(x)) {
|
||||
Py_SIZE(pylong) = -i;
|
||||
Py_SET_SIZE(pylong, -i);
|
||||
}
|
||||
|
||||
mpd_del(x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue