mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
This commit is contained in:
parent
a198645fa0
commit
5a57ade58e
28 changed files with 92 additions and 120 deletions
|
@ -155,8 +155,7 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
|
|||
tmp = PyUnicode_FromFormat("%U%c", self->prefix, SEP);
|
||||
if (tmp == NULL)
|
||||
goto error;
|
||||
Py_DECREF(self->prefix);
|
||||
self->prefix = tmp;
|
||||
Py_SETREF(self->prefix, tmp);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue