summaryrefslogtreecommitdiffstats
path: root/Modules/md5module.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-07 23:10:28 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-07 23:10:28 (GMT)
commit081fe46ff96bccb1a256c356443b625b467814c8 (patch)
treea33b9310cf545fa6b9437c9c2e4b9cda87ff6b12 /Modules/md5module.c
parent0bec35d2d07de46a904a9862a9bc6ac4d9d161b9 (diff)
downloadcpython-081fe46ff96bccb1a256c356443b625b467814c8.zip
cpython-081fe46ff96bccb1a256c356443b625b467814c8.tar.gz
cpython-081fe46ff96bccb1a256c356443b625b467814c8.tar.bz2
Issue #9566: cast unsigned int to Py_ssize_t in md5 and sha1 modules
Fix a compiler warning on Windows 64 bits.
Diffstat (limited to 'Modules/md5module.c')
-rw-r--r--Modules/md5module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 208930d..de43f1c 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -243,7 +243,7 @@ void md5_process(struct md5_state *md5,
in += MD5_BLOCKSIZE;
inlen -= MD5_BLOCKSIZE;
} else {
- n = MIN(inlen, (MD5_BLOCKSIZE - md5->curlen));
+ n = MIN(inlen, (Py_ssize_t)(MD5_BLOCKSIZE - md5->curlen));
memcpy(md5->buf + md5->curlen, in, (size_t)n);
md5->curlen += n;
in += n;