diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-01 22:50:43 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-01 22:50:43 (GMT) |
commit | bbdda21a7a54c30211b33ad736d7bbbf19ea08df (patch) | |
tree | 7fc2818e471cd159bfcc7c9c2413b91e57cfb6b3 /Modules/_datetimemodule.c | |
parent | 53e137c8dde65eb0d48d26d262f1f6bc5d103e68 (diff) | |
download | cpython-bbdda21a7a54c30211b33ad736d7bbbf19ea08df.zip cpython-bbdda21a7a54c30211b33ad736d7bbbf19ea08df.tar.gz cpython-bbdda21a7a54c30211b33ad736d7bbbf19ea08df.tar.bz2 |
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 7e4be5b..5cff3f8 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); } |