Skip to content

Commit e9a1dcb

Browse files
authored
bpo-8677: use PY_SSIZE_T_CLEAN in socketmodule.c (GH-12467)
1 parent c5a216e commit e9a1dcb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/socketmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Local naming conventions:
9999
# pragma weak inet_aton
100100
#endif
101101

102+
#define PY_SSIZE_T_CLEAN
102103
#include "Python.h"
103104
#include "structmember.h"
104105

@@ -1414,7 +1415,7 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
14141415
a->sll_pkttype,
14151416
a->sll_hatype,
14161417
a->sll_addr,
1417-
a->sll_halen);
1418+
(Py_ssize_t)a->sll_halen);
14181419
}
14191420
#endif /* HAVE_NETPACKET_PACKET_H && SIOCGIFNAME */
14201421

0 commit comments

Comments
 (0)