[Python-checkins] cpython: Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching

jason.coombs python-checkins at python.org
Sun Nov 10 20:02:52 CET 2013


http://hg.python.org/cpython/rev/a21f506d04c9
changeset:   87035:a21f506d04c9
user:        Jason R. Coombs <jaraco at jaraco.com>
date:        Sun Nov 10 13:43:22 2013 -0500
summary:
  Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix).

files:
  Modules/socketmodule.c |  6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -5188,7 +5188,11 @@
     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));

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list