@@ -111,7 +111,6 @@ Local naming conventions:
111
111
#include "pycore_moduleobject.h" // _PyModule_GetState
112
112
#include "pycore_time.h" // _PyTime_AsMilliseconds()
113
113
#include "pycore_pystate.h" // _Py_AssertHoldsTstate()
114
- #include "pycore_pyatomic_ft_wrappers.h"
115
114
116
115
#ifdef _Py_MEMORY_SANITIZER
117
116
# include <sanitizer/msan_interface.h>
@@ -565,7 +564,6 @@ static int sock_cloexec_works = -1;
565
564
static inline void
566
565
set_sock_fd (PySocketSockObject * s , SOCKET_T fd )
567
566
{
568
- #ifdef Py_GIL_DISABLED
569
567
#if SIZEOF_SOCKET_T == SIZEOF_INT
570
568
_Py_atomic_store_int_relaxed ((int * )& s -> sock_fd , (int )fd );
571
569
#elif SIZEOF_SOCKET_T == SIZEOF_LONG
@@ -575,15 +573,11 @@ set_sock_fd(PySocketSockObject *s, SOCKET_T fd)
575
573
#else
576
574
#error "Unsupported SIZEOF_SOCKET_T"
577
575
#endif
578
- #else
579
- s -> sock_fd = fd ;
580
- #endif
581
576
}
582
577
583
578
static inline SOCKET_T
584
579
get_sock_fd (PySocketSockObject * s )
585
580
{
586
- #ifdef Py_GIL_DISABLED
587
581
#if SIZEOF_SOCKET_T == SIZEOF_INT
588
582
return (SOCKET_T )_Py_atomic_load_int_relaxed ((int * )& s -> sock_fd );
589
583
#elif SIZEOF_SOCKET_T == SIZEOF_LONG
@@ -593,9 +587,6 @@ get_sock_fd(PySocketSockObject *s)
593
587
#else
594
588
#error "Unsupported SIZEOF_SOCKET_T"
595
589
#endif
596
- #else
597
- return s -> sock_fd ;
598
- #endif
599
590
}
600
591
601
592
#define _PySocketSockObject_CAST (op ) ((PySocketSockObject *)(op))
0 commit comments