mirror of
https://github.com/python/cpython.git
synced 2025-09-14 12:46:49 +00:00
gh-95878: Fix format char in datetime CAPI tests (GH-95879) (#95885)
(cherry picked from commit 8b34e914bb
)
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
1221e8c400
commit
731732aa8b
1 changed files with 4 additions and 4 deletions
|
@ -2959,7 +2959,7 @@ test_PyDateTime_GET(PyObject *self, PyObject *obj)
|
||||||
month = PyDateTime_GET_MONTH(obj);
|
month = PyDateTime_GET_MONTH(obj);
|
||||||
day = PyDateTime_GET_DAY(obj);
|
day = PyDateTime_GET_DAY(obj);
|
||||||
|
|
||||||
return Py_BuildValue("(lll)", year, month, day);
|
return Py_BuildValue("(iii)", year, month, day);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -2973,7 +2973,7 @@ test_PyDateTime_DATE_GET(PyObject *self, PyObject *obj)
|
||||||
microsecond = PyDateTime_DATE_GET_MICROSECOND(obj);
|
microsecond = PyDateTime_DATE_GET_MICROSECOND(obj);
|
||||||
PyObject *tzinfo = PyDateTime_DATE_GET_TZINFO(obj);
|
PyObject *tzinfo = PyDateTime_DATE_GET_TZINFO(obj);
|
||||||
|
|
||||||
return Py_BuildValue("(llllO)", hour, minute, second, microsecond, tzinfo);
|
return Py_BuildValue("(iiiiO)", hour, minute, second, microsecond, tzinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -2987,7 +2987,7 @@ test_PyDateTime_TIME_GET(PyObject *self, PyObject *obj)
|
||||||
microsecond = PyDateTime_TIME_GET_MICROSECOND(obj);
|
microsecond = PyDateTime_TIME_GET_MICROSECOND(obj);
|
||||||
PyObject *tzinfo = PyDateTime_TIME_GET_TZINFO(obj);
|
PyObject *tzinfo = PyDateTime_TIME_GET_TZINFO(obj);
|
||||||
|
|
||||||
return Py_BuildValue("(llllO)", hour, minute, second, microsecond, tzinfo);
|
return Py_BuildValue("(iiiiO)", hour, minute, second, microsecond, tzinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -2999,7 +2999,7 @@ test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj)
|
||||||
seconds = PyDateTime_DELTA_GET_SECONDS(obj);
|
seconds = PyDateTime_DELTA_GET_SECONDS(obj);
|
||||||
microseconds = PyDateTime_DELTA_GET_MICROSECONDS(obj);
|
microseconds = PyDateTime_DELTA_GET_MICROSECONDS(obj);
|
||||||
|
|
||||||
return Py_BuildValue("(lll)", days, seconds, microseconds);
|
return Py_BuildValue("(iii)", days, seconds, microseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* test_thread_state spawns a thread of its own, and that thread releases
|
/* test_thread_state spawns a thread of its own, and that thread releases
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue