]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111482: Fix time_clockid_converter() on AIX (#112170)
authorVictor Stinner <vstinner@python.org>
Thu, 16 Nov 2023 23:00:16 +0000 (00:00 +0100)
committerGitHub <noreply@github.com>
Thu, 16 Nov 2023 23:00:16 +0000 (00:00 +0100)
clockid_t is defined as long long on AIX.

Modules/timemodule.c

index e82f6eb98ebaf357c3c8ac2917e0169b891d8bdf..bc3901e0d7a6212f12fd96e57b35221375a95dbf 100644 (file)
@@ -236,8 +236,8 @@ _PyTime_GetClockWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
 static int
 time_clockid_converter(PyObject *obj, clockid_t *p)
 {
-#if defined(_AIX) && (SIZEOF_LONG == 8)
-    long clk_id = PyLong_AsLong(obj);
+#ifdef _AIX
+    long long clk_id = PyLong_AsLongLong(obj);
 #else
     int clk_id = PyLong_AsInt(obj);
 #endif