diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-27 12:38:28 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-27 12:38:28 +0200 |
| commit | bdb908ea5466bfa09869fd2e1e7f3b17fe0fb2ea (patch) | |
| tree | ab1e4e4a74bd5cb976d2473b5e76e9ba74b94edb /Modules/_bz2module.c | |
| parent | 40005a7807bf2140d045c2bb8b4ef8af1e4770a0 (diff) | |
| parent | 4a1e70fc31d224786a32f950edaf73c8ea9c194d (diff) | |
| download | cpython-git-bdb908ea5466bfa09869fd2e1e7f3b17fe0fb2ea.tar.gz | |
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 7dfd3072dc..425845fd4a 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; } |
