mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Merge 3.5
This commit is contained in:
commit
a63073a807
1 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
|
||||||
const int flags = GRND_NONBLOCK;
|
const int flags = GRND_NONBLOCK;
|
||||||
|
|
||||||
char *dest;
|
char *dest;
|
||||||
int n;
|
long n;
|
||||||
|
|
||||||
if (!getrandom_works)
|
if (!getrandom_works)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -146,7 +146,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
|
||||||
to 1024 bytes */
|
to 1024 bytes */
|
||||||
n = Py_MIN(size, 1024);
|
n = Py_MIN(size, 1024);
|
||||||
#else
|
#else
|
||||||
n = Py_MIN(size, INT_MAX);
|
n = Py_MIN(size, LONG_MAX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue