mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
multiprocessing.h: remove unused MIN and MAX macros
This commit is contained in:
parent
e0b99ba140
commit
640c35ce13
9 changed files with 25 additions and 66 deletions
|
@ -92,10 +92,6 @@ typedef struct {
|
|||
(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255); \
|
||||
(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(x, y) ( ((x)<(y))?(x):(y) )
|
||||
#endif
|
||||
|
||||
|
||||
/* SHA1 macros */
|
||||
|
||||
|
@ -220,7 +216,7 @@ sha1_process(struct sha1_state *sha1,
|
|||
in += SHA1_BLOCKSIZE;
|
||||
inlen -= SHA1_BLOCKSIZE;
|
||||
} else {
|
||||
n = MIN(inlen, (Py_ssize_t)(SHA1_BLOCKSIZE - sha1->curlen));
|
||||
n = Py_MIN(inlen, (Py_ssize_t)(SHA1_BLOCKSIZE - sha1->curlen));
|
||||
memcpy(sha1->buf + sha1->curlen, in, (size_t)n);
|
||||
sha1->curlen += (SHA1_INT32)n;
|
||||
in += n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue