summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-03-20 19:02:46 +0900
committerGitHub <noreply@github.com>2019-03-20 19:02:46 +0900
commite9a1dcb4237cb2be71ab05883d472038ea9caf62 (patch)
tree7252360c5eb8a6cfd6f8cca6b71f6f6d4937f25b /Modules/socketmodule.c
parentc5a216e0b97712bf19b4a6b7655c6bf22a367edd (diff)
downloadcpython-git-e9a1dcb4237cb2be71ab05883d472038ea9caf62.tar.gz
bpo-8677: use PY_SSIZE_T_CLEAN in socketmodule.c (GH-12467)
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 1120f6b513..b48f8a9c30 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -99,6 +99,7 @@ Local naming conventions:
# pragma weak inet_aton
#endif
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
@@ -1414,7 +1415,7 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
a->sll_pkttype,
a->sll_hatype,
a->sll_addr,
- a->sll_halen);
+ (Py_ssize_t)a->sll_halen);
}
#endif /* HAVE_NETPACKET_PACKET_H && SIOCGIFNAME */