Mercurial > cpython-lru_cache-weakref
diff Python/random.c @ 87130:baab11a466ab
Fix compiler warning in win32_urandom(): explicit cast to DWORD in
CryptGenRandom()
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Fri, 15 Nov 2013 23:26:25 +0100 |
| parents | b0295cc736d8 |
| children | adb471b9cba1 |
line wrap: on
line diff
--- a/Python/random.c Fri Nov 15 23:21:11 2013 +0100 +++ b/Python/random.c Fri Nov 15 23:26:25 2013 +0100 @@ -50,7 +50,7 @@ while (size > 0) { chunk = size > INT_MAX ? INT_MAX : size; - if (!CryptGenRandom(hCryptProv, chunk, buffer)) + if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer)) { /* CryptGenRandom() failed */ if (raise)
