diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-02 00:50:43 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-02 00:50:43 +0200 |
commit | ea4bd213402a67d964b8edd7221d98eecc806be7 (patch) | |
tree | c713518a7b9fcc3a7fcf135e22f159822973beb7 /Modules/_datetimemodule.c | |
parent | 90e8e06d349074dc58e81a15355b4756285c8182 (diff) | |
download | cpython-ea4bd213402a67d964b8edd7221d98eecc806be7.tar.gz |
Move assertion inside _PyTime_ObjectToTimeval()
Change also _PyTime_FromSeconds() assertion to ensure that the _PyTime_t type
is used.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 7e4be5baac..5cff3f8ffc 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -4100,7 +4100,6 @@ datetime_from_timestamp(PyObject *cls, TM_FUNC f, PyObject *timestamp, if (_PyTime_ObjectToTimeval(timestamp, &timet, &us, _PyTime_ROUND_FLOOR) == -1) return NULL; - assert(0 <= us && us <= 999999); return datetime_from_timet_and_us(cls, f, timet, (int)us, tzinfo); } |