diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-01 23:43:56 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-01 23:43:56 (GMT) |
commit | 744742320f259776dab1c8ef86e22225ef569d17 (patch) | |
tree | efc22921e39c78260a77c39ee277d4a89544401b /Modules/_testcapimodule.c | |
parent | bbdda21a7a54c30211b33ad736d7bbbf19ea08df (diff) | |
download | cpython-744742320f259776dab1c8ef86e22225ef569d17.zip cpython-744742320f259776dab1c8ef86e22225ef569d17.tar.gz cpython-744742320f259776dab1c8ef86e22225ef569d17.tar.bz2 |
Issue #23517: Add "half up" rounding mode to the _PyTime API
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r-- | Modules/_testcapimodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index ba0a24b..c38d9ae 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_UP) { PyErr_SetString(PyExc_ValueError, "invalid rounding"); return -1; } |