[Python-checkins] bpo-8677: use PY_SSIZE_T_CLEAN in socketmodule.c (GH-12467)

Inada Naoki webhook-mailer at python.org
Wed Mar 20 06:02:49 EDT 2019


https://github.com/python/cpython/commit/e9a1dcb4237cb2be71ab05883d472038ea9caf62
commit: e9a1dcb4237cb2be71ab05883d472038ea9caf62
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-03-20T19:02:46+09:00
summary:

bpo-8677: use PY_SSIZE_T_CLEAN in socketmodule.c (GH-12467)

files:
M Modules/socketmodule.c

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 1120f6b51325..b48f8a9c3093 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 */
 



More information about the Python-checkins mailing list