summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_randommodule.c12
-rw-r--r--Modules/_sha3/sha3module.c6
-rw-r--r--Modules/_xxsubinterpretersmodule.c2
3 files changed, 10 insertions, 10 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));
}
diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c
index 9cdee58..c826b42 100644
--- a/Modules/_sha3/sha3module.c
+++ b/Modules/_sha3/sha3module.c
@@ -40,7 +40,7 @@
#elif PY_BIG_ENDIAN
/* opt64 is not yet supported on big endian platforms */
#define KeccakOpt 32
-#elif SIZEOF_VOID_P == 8 && defined(PY_UINT64_T)
+#elif SIZEOF_VOID_P == 8
/* opt64 works only on little-endian 64bit platforms with unsigned int64 */
#define KeccakOpt 64
#else
@@ -48,9 +48,9 @@
#define KeccakOpt 32
#endif
-#if KeccakOpt == 64 && defined(PY_UINT64_T)
+#if KeccakOpt == 64
/* 64bit platforms with unsigned int64 */
- typedef PY_UINT64_T UINT64;
+ typedef uint64_t UINT64;
typedef unsigned char UINT8;
#endif
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
index b3616ae..fa35e14 100644
--- a/Modules/_xxsubinterpretersmodule.c
+++ b/Modules/_xxsubinterpretersmodule.c
@@ -2135,7 +2135,7 @@ static PyObject *
interp_get_main(PyObject *self, PyObject *Py_UNUSED(ignored))
{
// Currently, 0 is always the main interpreter.
- PY_INT64_T id = 0;
+ int64_t id = 0;
return _PyInterpreterID_New(id);
}