Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baddc84 commit b6dab6bCopy full SHA for b6dab6b
1 file changed
Modules/socketmodule.c
@@ -548,6 +548,9 @@ set_gaierror(int error)
548
static int
549
internal_setblocking(PySocketSockObject *s, int block)
550
{
551
+#ifdef MS_WINDOWS
552
+ u_long arg;
553
+#endif
554
#if !defined(MS_WINDOWS) \
555
&& !((defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)))
556
int delay_flag, new_delay_flag;
@@ -574,8 +577,8 @@ internal_setblocking(PySocketSockObject *s, int block)
574
577
fcntl(s->sock_fd, F_SETFL, new_delay_flag);
575
578
#endif
576
579
#else /* MS_WINDOWS */
- block = !block;
- ioctlsocket(s->sock_fd, FIONBIO, (u_long*)&block);
580
+ arg = !block;
581
+ ioctlsocket(s->sock_fd, FIONBIO, &arg);
582
#endif /* MS_WINDOWS */
583
Py_END_ALLOW_THREADS
584
0 commit comments