|
29 | 29 | #include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION() |
30 | 30 | #include "pycore_fileutils.h" // _PyIsSelectable_fd() |
31 | 31 | #include "pycore_long.h" // _PyLong_UnsignedLongLong_Converter() |
32 | | -#include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_PTR_RELAXED() |
33 | 32 | #include "pycore_pyerrors.h" // _PyErr_ChainExceptions1() |
34 | 33 | #include "pycore_time.h" // _PyDeadline_Init() |
35 | 34 | #include "pycore_tuple.h" // _PyTuple_FromPair |
@@ -5160,7 +5159,7 @@ _servername_callback(SSL *s, int *al, void *args) |
5160 | 5159 | PyGILState_STATE gstate = PyGILState_Ensure(); |
5161 | 5160 |
|
5162 | 5161 | Py_BEGIN_CRITICAL_SECTION(sslctx); |
5163 | | - sni_cb = Py_XNewRef(FT_ATOMIC_LOAD_PTR_RELAXED(sslctx->set_sni_cb)); |
| 5162 | + sni_cb = Py_XNewRef(sslctx->set_sni_cb); |
5164 | 5163 | Py_END_CRITICAL_SECTION(); |
5165 | 5164 |
|
5166 | 5165 | if (sni_cb == NULL) { |
@@ -5284,7 +5283,7 @@ static PyObject * |
5284 | 5283 | _ssl__SSLContext_sni_callback_get_impl(PySSLContext *self) |
5285 | 5284 | /*[clinic end generated code: output=961e6575cdfaf036 input=3aee06696b0874d9]*/ |
5286 | 5285 | { |
5287 | | - PyObject *cb = FT_ATOMIC_LOAD_PTR_RELAXED(self->set_sni_cb); |
| 5286 | + PyObject *cb = self->set_sni_cb; |
5288 | 5287 | if (cb == NULL) { |
5289 | 5288 | Py_RETURN_NONE; |
5290 | 5289 | } |
@@ -5316,7 +5315,7 @@ _ssl__SSLContext_sni_callback_set_impl(PySSLContext *self, PyObject *value) |
5316 | 5315 | "not a callable object"); |
5317 | 5316 | return -1; |
5318 | 5317 | } |
5319 | | - FT_ATOMIC_STORE_PTR_RELAXED(self->set_sni_cb, Py_NewRef(value)); |
| 5318 | + self->set_sni_cb = Py_NewRef(value); |
5320 | 5319 | SSL_CTX_set_tlsext_servername_callback(self->ctx, _servername_callback); |
5321 | 5320 | SSL_CTX_set_tlsext_servername_arg(self->ctx, self); |
5322 | 5321 | } |
|
0 commit comments