commit | 5951f2300f43d75d344d542e171daed47a0382a6 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Thu Dec 24 10:35:35 2015 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Thu Dec 24 10:35:35 2015 +0200 |
tree | 2e173dda0c0d4c4bf887e8a6a309430d0d9cd5be | |
parent | 6ed42ea08b3a961944e94f1dd941ffabc7657065 [diff] [blame] |
Issue #20440: Massive replacing unsafe attribute setting code with special macro Py_SETREF.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2925651..9f503bd 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -436,8 +436,7 @@ return -1; Py_UNICODE_COPY(w->str, v->str, length < v->length ? length : v->length); - Py_DECREF(*unicode); - *unicode = w; + Py_SETREF(*unicode, w); return 0; }