diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 01:49:14 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 01:49:14 (GMT) |
commit | 869e1778c0bcfc0928701c6ae0703934359d036b (patch) | |
tree | 231b2e09d453cca2ce5bf462ffb91f0f7303f3c0 /Modules/selectmodule.c | |
parent | bcdd777d3c01a6db3b4357922663624ef617e65a (diff) | |
download | cpython-869e1778c0bcfc0928701c6ae0703934359d036b.zip cpython-869e1778c0bcfc0928701c6ae0703934359d036b.tar.gz cpython-869e1778c0bcfc0928701c6ae0703934359d036b.tar.bz2 |
Issue #22117: Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING
All these functions only accept positive timeouts, so this change has no effect
in practice.
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r-- | Modules/selectmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 2c82ce7..a852344 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -209,13 +209,13 @@ select_select(PyObject *self, PyObject *args) else { _PyTime_t ts; - if (_PyTime_FromSecondsObject(&ts, tout, _PyTime_ROUND_UP) < 0) { + if (_PyTime_FromSecondsObject(&ts, tout, _PyTime_ROUND_CEILING) < 0) { PyErr_SetString(PyExc_TypeError, "timeout must be a float or None"); return NULL; } - if (_PyTime_AsTimeval(ts, &tv, _PyTime_ROUND_UP) == -1) + if (_PyTime_AsTimeval(ts, &tv, _PyTime_ROUND_CEILING) == -1) return NULL; if (tv.tv_sec < 0) { PyErr_SetString(PyExc_ValueError, "timeout must be non-negative"); @@ -2014,7 +2014,8 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args) else { _PyTime_t ts; - if (_PyTime_FromSecondsObject(&ts, otimeout, _PyTime_ROUND_UP) < 0) { + if (_PyTime_FromSecondsObject(&ts, + otimeout, _PyTime_ROUND_CEILING) < 0) { PyErr_Format(PyExc_TypeError, "timeout argument must be an number " "or None, got %.200s", |