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/_ssl.c b/Modules/_ssl.c index 89f2aaa..9116d9f 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c
@@ -1467,8 +1467,7 @@ return -1; #else Py_INCREF(value); - Py_DECREF(self->ctx); - self->ctx = (PySSLContext *) value; + Py_SETREF(self->ctx, (PySSLContext *)value); SSL_set_SSL_CTX(self->ssl, self->ctx->ctx); #endif } else {