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/Modules/_sre.c b/Modules/_sre.c index 8ef8c2c..829fb6b 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c
@@ -2054,8 +2054,7 @@ if (!copy) return 0; - Py_DECREF(*object); - *object = copy; + Py_SETREF(*object, copy); return 1; /* success */ }