Skip to content

Commit 67da443

Browse files
committed
Remove FT_ATOMIC_LOAD_PTR_RELAXED
1 parent 1548b6e commit 67da443

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Modules/_ssl.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
3030
#include "pycore_fileutils.h" // _PyIsSelectable_fd()
3131
#include "pycore_long.h" // _PyLong_UnsignedLongLong_Converter()
32-
#include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_PTR_RELAXED()
3332
#include "pycore_pyerrors.h" // _PyErr_ChainExceptions1()
3433
#include "pycore_time.h" // _PyDeadline_Init()
3534
#include "pycore_tuple.h" // _PyTuple_FromPair
@@ -5160,7 +5159,7 @@ _servername_callback(SSL *s, int *al, void *args)
51605159
PyGILState_STATE gstate = PyGILState_Ensure();
51615160

51625161
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);
51645163
Py_END_CRITICAL_SECTION();
51655164

51665165
if (sni_cb == NULL) {
@@ -5284,7 +5283,7 @@ static PyObject *
52845283
_ssl__SSLContext_sni_callback_get_impl(PySSLContext *self)
52855284
/*[clinic end generated code: output=961e6575cdfaf036 input=3aee06696b0874d9]*/
52865285
{
5287-
PyObject *cb = FT_ATOMIC_LOAD_PTR_RELAXED(self->set_sni_cb);
5286+
PyObject *cb = self->set_sni_cb;
52885287
if (cb == NULL) {
52895288
Py_RETURN_NONE;
52905289
}
@@ -5316,7 +5315,7 @@ _ssl__SSLContext_sni_callback_set_impl(PySSLContext *self, PyObject *value)
53165315
"not a callable object");
53175316
return -1;
53185317
}
5319-
FT_ATOMIC_STORE_PTR_RELAXED(self->set_sni_cb, Py_NewRef(value));
5318+
self->set_sni_cb = Py_NewRef(value);
53205319
SSL_CTX_set_tlsext_servername_callback(self->ctx, _servername_callback);
53215320
SSL_CTX_set_tlsext_servername_arg(self->ctx, self);
53225321
}

0 commit comments

Comments
 (0)