Skip to content

Commit 731732a

Browse files
gh-95878: Fix format char in datetime CAPI tests (GH-95879) (#95885)
(cherry picked from commit 8b34e91) Co-authored-by: Christian Heimes <[email protected]> Co-authored-by: Christian Heimes <[email protected]>
1 parent 1221e8c commit 731732a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/_testcapimodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,7 @@ test_PyDateTime_GET(PyObject *self, PyObject *obj)
29592959
month = PyDateTime_GET_MONTH(obj);
29602960
day = PyDateTime_GET_DAY(obj);
29612961

2962-
return Py_BuildValue("(lll)", year, month, day);
2962+
return Py_BuildValue("(iii)", year, month, day);
29632963
}
29642964

29652965
static PyObject *
@@ -2973,7 +2973,7 @@ test_PyDateTime_DATE_GET(PyObject *self, PyObject *obj)
29732973
microsecond = PyDateTime_DATE_GET_MICROSECOND(obj);
29742974
PyObject *tzinfo = PyDateTime_DATE_GET_TZINFO(obj);
29752975

2976-
return Py_BuildValue("(llllO)", hour, minute, second, microsecond, tzinfo);
2976+
return Py_BuildValue("(iiiiO)", hour, minute, second, microsecond, tzinfo);
29772977
}
29782978

29792979
static PyObject *
@@ -2987,7 +2987,7 @@ test_PyDateTime_TIME_GET(PyObject *self, PyObject *obj)
29872987
microsecond = PyDateTime_TIME_GET_MICROSECOND(obj);
29882988
PyObject *tzinfo = PyDateTime_TIME_GET_TZINFO(obj);
29892989

2990-
return Py_BuildValue("(llllO)", hour, minute, second, microsecond, tzinfo);
2990+
return Py_BuildValue("(iiiiO)", hour, minute, second, microsecond, tzinfo);
29912991
}
29922992

29932993
static PyObject *
@@ -2999,7 +2999,7 @@ test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj)
29992999
seconds = PyDateTime_DELTA_GET_SECONDS(obj);
30003000
microseconds = PyDateTime_DELTA_GET_MICROSECONDS(obj);
30013001

3002-
return Py_BuildValue("(lll)", days, seconds, microseconds);
3002+
return Py_BuildValue("(iii)", days, seconds, microseconds);
30033003
}
30043004

30053005
/* test_thread_state spawns a thread of its own, and that thread releases

0 commit comments

Comments
 (0)