Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 84022:41a2cbe23349
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
multiprocessing.h: remove unused MIN and MAX macros
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Tue, 04 Jun 2013 23:14:37 +0200 |
| parents | 2472603af83e |
| children | 062f1985a5b7 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Tue Jun 04 23:02:46 2013 +0200 +++ b/Modules/socketmodule.c Tue Jun 04 23:14:37 2013 +0200 @@ -95,9 +95,6 @@ #include "Python.h" #include "structmember.h" -#undef MAX -#define MAX(x, y) ((x) < (y) ? (y) : (x)) - /* Socket object documentation */ PyDoc_STRVAR(sock_doc, "socket([family[, type[, proto]]]) -> socket object\n\ @@ -4819,7 +4816,7 @@ char* ip; int retval; #ifdef ENABLE_IPV6 - char packed[MAX(sizeof(struct in_addr), sizeof(struct in6_addr))]; + char packed[Py_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))]; #else char packed[sizeof(struct in_addr)]; #endif @@ -4870,7 +4867,7 @@ int len; const char* retval; #ifdef ENABLE_IPV6 - char ip[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1]; + char ip[Py_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1]; #else char ip[INET_ADDRSTRLEN + 1]; #endif
