Staging
v0.5.1
https://github.com/python/cpython
Revision 665ddc9bb38d70ddb075654c8747c2ab5c302cf9 authored by Raymond Hettinger on 14 January 2008, 23:02:51 UTC, committed by Raymond Hettinger on 14 January 2008, 23:02:51 UTC
1 parent b9c741c
Raw File
Tip revision: 665ddc9bb38d70ddb075654c8747c2ab5c302cf9 authored by Raymond Hettinger on 14 January 2008, 23:02:51 UTC
Fix 1698398: Zipfile.printdir() crashed because the format string expected a tuple object of length six instead of a time.struct_time object.
Tip revision: 665ddc9
timefuncs.h
/*  timefuncs.h
 */

/* Utility function related to timemodule.c. */

#ifndef TIMEFUNCS_H
#define TIMEFUNCS_H
#ifdef __cplusplus
extern "C" {
#endif


/* Cast double x to time_t, but raise ValueError if x is too large
 * to fit in a time_t.  ValueError is set on return iff the return
 * value is (time_t)-1 and PyErr_Occurred().
 */
PyAPI_FUNC(time_t) _PyTime_DoubleToTimet(double x);


#ifdef __cplusplus
}
#endif
#endif  /* TIMEFUNCS_H */
back to top