mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #20440: More use of Py_SETREF.
This patch is manually crafted and contains changes that couldn't be handled automatically.
This commit is contained in:
parent
4a1e70fc31
commit
191321d11b
7 changed files with 39 additions and 58 deletions
|
@ -961,14 +961,11 @@ zlib_Compress_copy_impl(compobject *self)
|
|||
goto error;
|
||||
}
|
||||
Py_INCREF(self->unused_data);
|
||||
Py_SETREF(retval->unused_data, self->unused_data);
|
||||
Py_INCREF(self->unconsumed_tail);
|
||||
Py_SETREF(retval->unconsumed_tail, self->unconsumed_tail);
|
||||
Py_XINCREF(self->zdict);
|
||||
Py_XDECREF(retval->unused_data);
|
||||
Py_XDECREF(retval->unconsumed_tail);
|
||||
Py_XDECREF(retval->zdict);
|
||||
retval->unused_data = self->unused_data;
|
||||
retval->unconsumed_tail = self->unconsumed_tail;
|
||||
retval->zdict = self->zdict;
|
||||
Py_SETREF(retval->zdict, self->zdict);
|
||||
retval->eof = self->eof;
|
||||
|
||||
/* Mark it as being initialized */
|
||||
|
@ -1020,14 +1017,11 @@ zlib_Decompress_copy_impl(compobject *self)
|
|||
}
|
||||
|
||||
Py_INCREF(self->unused_data);
|
||||
Py_SETREF(retval->unused_data, self->unused_data);
|
||||
Py_INCREF(self->unconsumed_tail);
|
||||
Py_SETREF(retval->unconsumed_tail, self->unconsumed_tail);
|
||||
Py_XINCREF(self->zdict);
|
||||
Py_XDECREF(retval->unused_data);
|
||||
Py_XDECREF(retval->unconsumed_tail);
|
||||
Py_XDECREF(retval->zdict);
|
||||
retval->unused_data = self->unused_data;
|
||||
retval->unconsumed_tail = self->unconsumed_tail;
|
||||
retval->zdict = self->zdict;
|
||||
Py_SETREF(retval->zdict, self->zdict);
|
||||
retval->eof = self->eof;
|
||||
|
||||
/* Mark it as being initialized */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue