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;
     }