diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-07 23:18:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 23:18:08 +0100 |
commit | 60ac6ed5579f6666130fc264d3b748ee9575e3aa (patch) | |
tree | c21d06611bea34d88dd5922850223837fa6ae733 /Modules/_decimal | |
parent | bpo-39502: Fix 64-bit Python PyTime_localtime() on AIX (GH-18285) (diff) | |
download | cpython-60ac6ed5579f6666130fc264d3b748ee9575e3aa.tar.gz cpython-60ac6ed5579f6666130fc264d3b748ee9575e3aa.tar.bz2 cpython-60ac6ed5579f6666130fc264d3b748ee9575e3aa.zip |
bpo-39573: Use Py_SET_SIZE() function (GH-18402)
Replace direct acccess to PyVarObject.ob_size with usage of
the Py_SET_SIZE() function.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r-- | Modules/_decimal/_decimal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 75a8ddba1fe..0fbbb73a6bd 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -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); |