Skip to content

Commit a7aa031

Browse files
vstinneraisk
authored andcommitted
pythongh-111482: Fix time_clockid_converter() on AIX (python#112170)
clockid_t is defined as long long on AIX.
1 parent 4c4f7c6 commit a7aa031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/timemodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ _PyTime_GetClockWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
236236
static int
237237
time_clockid_converter(PyObject *obj, clockid_t *p)
238238
{
239-
#if defined(_AIX) && (SIZEOF_LONG == 8)
240-
long clk_id = PyLong_AsLong(obj);
239+
#ifdef _AIX
240+
long long clk_id = PyLong_AsLongLong(obj);
241241
#else
242242
int clk_id = PyLong_AsInt(obj);
243243
#endif

0 commit comments

Comments
 (0)