diff options
author | Christian Heimes <christian@python.org> | 2022-08-11 09:58:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 09:58:10 (GMT) |
commit | 8b34e914bba2ccd6ae39609410db49d0beb19cb1 (patch) | |
tree | 6d77369c3af8ffe49b219b85dbc5491877868fea | |
parent | b4c857d0fd74abb1ede6fe083c4fa3ca728b2b83 (diff) | |
download | cpython-8b34e914bba2ccd6ae39609410db49d0beb19cb1.zip cpython-8b34e914bba2ccd6ae39609410db49d0beb19cb1.tar.gz cpython-8b34e914bba2ccd6ae39609410db49d0beb19cb1.tar.bz2 |
gh-95878: Fix format char in datetime CAPI tests (GH-95879)
-rw-r--r-- | Modules/_testcapimodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 91bdeb8..8d9a0c1 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -2438,7 +2438,7 @@ test_PyDateTime_GET(PyObject *self, PyObject *obj) month = PyDateTime_GET_MONTH(obj); day = PyDateTime_GET_DAY(obj); - return Py_BuildValue("(lll)", year, month, day); + return Py_BuildValue("(iii)", year, month, day); } static PyObject * @@ -2452,7 +2452,7 @@ test_PyDateTime_DATE_GET(PyObject *self, PyObject *obj) microsecond = PyDateTime_DATE_GET_MICROSECOND(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 * @@ -2466,7 +2466,7 @@ test_PyDateTime_TIME_GET(PyObject *self, PyObject *obj) microsecond = PyDateTime_TIME_GET_MICROSECOND(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 * @@ -2478,7 +2478,7 @@ test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj) seconds = PyDateTime_DELTA_GET_SECONDS(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 |