summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-08-11 11:46:14 (GMT)
committerGitHub <noreply@github.com>2022-08-11 11:46:14 (GMT)
commit731732aa8bf71b84e4bc1dfead27f524eb710fce (patch)
tree0d015800befa5f5231bace31ce80798478fd372a /Modules
parent1221e8c400933f24be69bd156f03cd1411746e6c (diff)
downloadcpython-731732aa8bf71b84e4bc1dfead27f524eb710fce.zip
cpython-731732aa8bf71b84e4bc1dfead27f524eb710fce.tar.gz
cpython-731732aa8bf71b84e4bc1dfead27f524eb710fce.tar.bz2
gh-95878: Fix format char in datetime CAPI tests (GH-95879) (#95885)
(cherry picked from commit 8b34e914bba2ccd6ae39609410db49d0beb19cb1) Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 8087b44..1a3cbe0 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2959,7 +2959,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 *
@@ -2973,7 +2973,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 *
@@ -2987,7 +2987,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 *
@@ -2999,7 +2999,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