diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-27 10:36:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-27 10:36:18 (GMT) |
commit | 4a1e70fc31d224786a32f950edaf73c8ea9c194d (patch) | |
tree | 2000711f6cd68f009e4859ce3f9e1e9fe0a1f76e /Modules/_bz2module.c | |
parent | a5892abf235c67cf8e75b7fcef65e6aebe701d4c (diff) | |
download | cpython-4a1e70fc31d224786a32f950edaf73c8ea9c194d.zip cpython-4a1e70fc31d224786a32f950edaf73c8ea9c194d.tar.gz cpython-4a1e70fc31d224786a32f950edaf73c8ea9c194d.tar.bz2 |
Issue #20440: Applied yet one patch for using Py_SETREF.
The patch is automatically generated, it replaces the code that uses Py_CLEAR.
Diffstat (limited to 'Modules/_bz2module.c')
-rw-r--r-- | Modules/_bz2module.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c index 7dfd307..425845f 100644 --- a/Modules/_bz2module.c +++ b/Modules/_bz2module.c @@ -540,9 +540,8 @@ decompress(BZ2Decompressor *d, char *data, size_t len, Py_ssize_t max_length) if (d->eof) { d->needs_input = 0; if (d->bzs_avail_in_real > 0) { - Py_CLEAR(d->unused_data); - d->unused_data = PyBytes_FromStringAndSize( - bzs->next_in, d->bzs_avail_in_real); + Py_SETREF(d->unused_data, + PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real)); if (d->unused_data == NULL) goto error; } |