summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index ba0a24b..1f013c2 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2646,7 +2646,9 @@ run_in_subinterp(PyObject *self, PyObject *args)
static int
check_time_rounding(int round)
{
- if (round != _PyTime_ROUND_FLOOR && round != _PyTime_ROUND_CEILING) {
+ if (round != _PyTime_ROUND_FLOOR
+ && round != _PyTime_ROUND_CEILING
+ && round != _PyTime_ROUND_HALF_EVEN) {
PyErr_SetString(PyExc_ValueError, "invalid rounding");
return -1;
}
@@ -4112,6 +4114,7 @@ PyInit__testcapi(void)
PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyLong_FromSsize_t(PY_SSIZE_T_MAX));
PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyLong_FromSsize_t(PY_SSIZE_T_MIN));
PyModule_AddObject(m, "SIZEOF_PYGC_HEAD", PyLong_FromSsize_t(sizeof(PyGC_Head)));
+ PyModule_AddObject(m, "SIZEOF_TIME_T", PyLong_FromSsize_t(sizeof(time_t)));
Py_INCREF(&PyInstanceMethod_Type);
PyModule_AddObject(m, "instancemethod", (PyObject *)&PyInstanceMethod_Type);