| Tim Peters | 1b6f7a9 | 2004-06-20 02:50:16 +0000 | [diff] [blame] | 1 | /*  timefuncs.h | 
 | 2 |  */ | 
 | 3 |  | 
 | 4 | /* Utility function related to timemodule.c. */ | 
 | 5 |  | 
 | 6 | #ifndef TIMEFUNCS_H | 
 | 7 | #define TIMEFUNCS_H | 
 | 8 | #ifdef __cplusplus | 
 | 9 | extern "C" { | 
 | 10 | #endif | 
 | 11 |  | 
 | 12 |  | 
 | 13 | /* Cast double x to time_t, but raise ValueError if x is too large | 
 | 14 |  * to fit in a time_t.  ValueError is set on return iff the return | 
 | 15 |  * value is (time_t)-1 and PyErr_Occurred(). | 
 | 16 |  */ | 
| Martin v. Löwis | 4d0d471 | 2010-12-03 20:14:31 +0000 | [diff] [blame] | 17 | #ifndef Py_LIMITED_API | 
| Tim Peters | 1b6f7a9 | 2004-06-20 02:50:16 +0000 | [diff] [blame] | 18 | PyAPI_FUNC(time_t) _PyTime_DoubleToTimet(double x); | 
| Martin v. Löwis | 4d0d471 | 2010-12-03 20:14:31 +0000 | [diff] [blame] | 19 | #endif | 
| Tim Peters | 1b6f7a9 | 2004-06-20 02:50:16 +0000 | [diff] [blame] | 20 |  | 
 | 21 |  | 
 | 22 | #ifdef __cplusplus | 
 | 23 | } | 
 | 24 | #endif | 
 | 25 | #endif  /* TIMEFUNCS_H */ |