summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-11-10 18:43:22 (GMT)
committerJason R. Coombs <jaraco@jaraco.com>2013-11-10 18:43:22 (GMT)
commit8ec784c2df2cfe9783d6434a46815c8d0c4f29f0 (patch)
treeeff301d10f579f05074d76be3d17832f8ce50534 /Modules
parentda0fc14d46a174b921ea0f68e7996bf1cda9b95d (diff)
downloadcpython-8ec784c2df2cfe9783d6434a46815c8d0c4f29f0.zip
cpython-8ec784c2df2cfe9783d6434a46815c8d0c4f29f0.tar.gz
cpython-8ec784c2df2cfe9783d6434a46815c8d0c4f29f0.tar.bz2
Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix).
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 6c4b050..fa61cfd 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -5188,7 +5188,11 @@ socket_inet_ntop(PyObject *self, PyObject *args)
int len;
struct sockaddr_in6 addr;
DWORD addrlen, ret, retlen;
- char ip[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
+#ifdef ENABLE_IPV6
+ char ip[Py_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
+#else
+ char ip[INET_ADDRSTRLEN + 1];
+#endif
/* Guarantee NUL-termination for PyUnicode_FromString() below */
memset((void *) &ip[0], '\0', sizeof(ip));