diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-06-20 02:50:16 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-06-20 02:50:16 (GMT) |
commit | 1b6f7a9057874ecd2793059f210de87837fe1911 (patch) | |
tree | 950e95d9866258870fc075706b99de3fcfbf2e72 /Misc | |
parent | 1c3fa18be76d1bcddb2de516913f46a32c5ed860 (diff) | |
download | cpython-1b6f7a9057874ecd2793059f210de87837fe1911.zip cpython-1b6f7a9057874ecd2793059f210de87837fe1911.tar.gz cpython-1b6f7a9057874ecd2793059f210de87837fe1911.tar.bz2 |
Bug 975996: Add _PyTime_DoubleToTimet to C API
New include file timefuncs.h exports private API function
_PyTime_DoubleToTimet() from timemodule.c. timemodule should export
some other functions too (look for painful bits in datetimemodule.c).
Added insane-argument checking to datetime's assorted fromtimestamp()
and utcfromtimestamp() methods. Added insane-argument tests of these
to test_datetime, and insane-argument tests for ctime(), localtime()
and gmtime() to test_time.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -228,9 +228,13 @@ Core and builtins Extension modules ----------------- -- time module code that deals with time_t timestamps will now raise a - ValueError if more than a second is lost in precision from time_t being less - precise than a double. Closes bug #919012. +- time module code that deals with input POSIX timestamps will now raise + ValueError if more than a second is lost in precision when the + timestamp is cast to the platform C time_t type. There's no chance + that the platform will do anything sensible with the result in such + cases. This includes ctime(), localtime() and gmtime(). Assorted + fromtimestamp() and utcfromtimestamp() methods in the datetime module + were also protected. Closes bugs #919012 and 975996. - fcntl.ioctl now warns if the mutate flag is not specified. @@ -555,6 +559,11 @@ Build C API ----- +- Private function _PyTime_DoubleToTimet added, to convert a Python + timestamp (C double) to platform time_t with some out-of-bounds + checking. Declared in new header file timefuncs.h. It would be + good to expose some other internal timemodule.c functions there. + - New public functions PyEval_EvaluateFrame and PyGen_New to expose generator objects. |