diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-17 17:13:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 17:13:06 (GMT) |
commit | 1a1bd2e23871619adc1405e1cdc7c1e61252fd2c (patch) | |
tree | 180c1a278ebff4e696cf213ab41857983aca75c4 /Modules/_randommodule.c | |
parent | 9f5fe7910f4a1bf5a425837d4915e332b945eb7b (diff) | |
download | cpython-1a1bd2e23871619adc1405e1cdc7c1e61252fd2c.zip cpython-1a1bd2e23871619adc1405e1cdc7c1e61252fd2c.tar.gz cpython-1a1bd2e23871619adc1405e1cdc7c1e61252fd2c.tar.bz2 |
bpo-40302: Replace PY_INT64_T with int64_t (GH-19573)
* Replace PY_INT64_T with int64_t
* Replace PY_UINT32_T with uint32_t
* Replace PY_UINT64_T with uint64_t
sha3module.c no longer checks if PY_UINT64_T is defined since it's
always defined and uint64_t is always available on platforms
supported by Python.
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r-- | Modules/_randommodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index 560460b..51c0842 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -234,7 +234,7 @@ init_by_array(RandomObject *self, uint32_t init_key[], size_t key_length) static int random_seed_urandom(RandomObject *self) { - PY_UINT32_T key[N]; + uint32_t key[N]; if (_PyOS_URandomNonblock(key, sizeof(key)) < 0) { return -1; @@ -250,14 +250,14 @@ random_seed_time_pid(RandomObject *self) uint32_t key[5]; now = _PyTime_GetSystemClock(); - key[0] = (PY_UINT32_T)(now & 0xffffffffU); - key[1] = (PY_UINT32_T)(now >> 32); + key[0] = (uint32_t)(now & 0xffffffffU); + key[1] = (uint32_t)(now >> 32); - key[2] = (PY_UINT32_T)getpid(); + key[2] = (uint32_t)getpid(); now = _PyTime_GetMonotonicClock(); - key[3] = (PY_UINT32_T)(now & 0xffffffffU); - key[4] = (PY_UINT32_T)(now >> 32); + key[3] = (uint32_t)(now & 0xffffffffU); + key[4] = (uint32_t)(now >> 32); init_by_array(self, key, Py_ARRAY_LENGTH(key)); } |