Skip to content

Commit 9c04e25

Browse files
gh-95878: Fix format char in datetime CAPI tests (GH-95879)
(cherry picked from commit 8b34e91) Co-authored-by: Christian Heimes <[email protected]>
1 parent 759227f commit 9c04e25

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
@@ -2800,7 +2800,7 @@ test_PyDateTime_GET(PyObject *self, PyObject *obj)
28002800
month = PyDateTime_GET_MONTH(obj);
28012801
day = PyDateTime_GET_DAY(obj);
28022802

2803-
return Py_BuildValue("(lll)", year, month, day);
2803+
return Py_BuildValue("(iii)", year, month, day);
28042804
}
28052805

28062806
static PyObject *
@@ -2814,7 +2814,7 @@ test_PyDateTime_DATE_GET(PyObject *self, PyObject *obj)
28142814
microsecond = PyDateTime_DATE_GET_MICROSECOND(obj);
28152815
PyObject *tzinfo = PyDateTime_DATE_GET_TZINFO(obj);
28162816

2817-
return Py_BuildValue("(llllO)", hour, minute, second, microsecond, tzinfo);
2817+
return Py_BuildValue("(iiiiO)", hour, minute, second, microsecond, tzinfo);
28182818
}
28192819

28202820
static PyObject *
@@ -2828,7 +2828,7 @@ test_PyDateTime_TIME_GET(PyObject *self, PyObject *obj)
28282828
microsecond = PyDateTime_TIME_GET_MICROSECOND(obj);
28292829
PyObject *tzinfo = PyDateTime_TIME_GET_TZINFO(obj);
28302830

2831-
return Py_BuildValue("(llllO)", hour, minute, second, microsecond, tzinfo);
2831+
return Py_BuildValue("(iiiiO)", hour, minute, second, microsecond, tzinfo);
28322832
}
28332833

28342834
static PyObject *
@@ -2840,7 +2840,7 @@ test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj)
28402840
seconds = PyDateTime_DELTA_GET_SECONDS(obj);
28412841
microseconds = PyDateTime_DELTA_GET_MICROSECONDS(obj);
28422842

2843-
return Py_BuildValue("(lll)", days, seconds, microseconds);
2843+
return Py_BuildValue("(iii)", days, seconds, microseconds);
28442844
}
28452845

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

0 commit comments

Comments
 (0)