summaryrefslogtreecommitdiffstats
path: root/Modules/md5module.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-04 21:14:37 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-04 21:14:37 (GMT)
commit640c35ce135d71c6aafa13bb5985150f680416cc (patch)
treebec20a433c21cf6099478fdc91ea116934c21460 /Modules/md5module.c
parente0b99ba140f83551cdeecb2a4ca9817aedde7ff5 (diff)
downloadcpython-640c35ce135d71c6aafa13bb5985150f680416cc.zip
cpython-640c35ce135d71c6aafa13bb5985150f680416cc.tar.gz
cpython-640c35ce135d71c6aafa13bb5985150f680416cc.tar.bz2
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
multiprocessing.h: remove unused MIN and MAX macros
Diffstat (limited to 'Modules/md5module.c')
-rw-r--r--Modules/md5module.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 6e15a20..7dc38ea 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -91,10 +91,6 @@ typedef struct {
(y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
(y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); }
-#ifndef MIN
- #define MIN(x, y) ( ((x)<(y))?(x):(y) )
-#endif
-
/* MD5 macros */
@@ -244,7 +240,7 @@ md5_process(struct md5_state *md5, const unsigned char *in, Py_ssize_t inlen)
in += MD5_BLOCKSIZE;
inlen -= MD5_BLOCKSIZE;
} else {
- n = MIN(inlen, (Py_ssize_t)(MD5_BLOCKSIZE - md5->curlen));
+ n = Py_MIN(inlen, (Py_ssize_t)(MD5_BLOCKSIZE - md5->curlen));
memcpy(md5->buf + md5->curlen, in, (size_t)n);
md5->curlen += (MD5_INT32)n;
in += n;