@@ -4198,20 +4198,20 @@ typedef struct tm *(*TM_FUNC)(const time_t *timer);
41984198
41994199/* As of version 2015f max fold in IANA database is
42004200 * 23 hours at 1969-09-30 13:00:00 in Kwajalein. */
4201- static PY_LONG_LONG max_fold_seconds = 24 * 3600 ;
4201+ static long long max_fold_seconds = 24 * 3600 ;
42024202/* NB: date(1970,1,1).toordinal() == 719163 */
4203- static PY_LONG_LONG epoch = Py_LL (719163 ) * 24 * 60 * 60 ;
4203+ static long long epoch = Py_LL (719163 ) * 24 * 60 * 60 ;
42044204
4205- static PY_LONG_LONG
4205+ static long long
42064206utc_to_seconds (int year , int month , int day ,
42074207 int hour , int minute , int second )
42084208{
4209- PY_LONG_LONG ordinal = ymd_to_ord (year , month , day );
4209+ long long ordinal = ymd_to_ord (year , month , day );
42104210 return ((ordinal * 24 + hour ) * 60 + minute ) * 60 + second ;
42114211}
42124212
4213- static PY_LONG_LONG
4214- local (PY_LONG_LONG u )
4213+ static long long
4214+ local (long long u )
42154215{
42164216 struct tm local_time ;
42174217 time_t t ;
@@ -4269,7 +4269,7 @@ datetime_from_timet_and_us(PyObject *cls, TM_FUNC f, time_t timet, int us,
42694269 second = Py_MIN (59 , tm -> tm_sec );
42704270
42714271 if (tzinfo == Py_None && f == localtime ) {
4272- PY_LONG_LONG probe_seconds , result_seconds , transition ;
4272+ long long probe_seconds , result_seconds , transition ;
42734273
42744274 result_seconds = utc_to_seconds (year , month , day ,
42754275 hour , minute , second );
@@ -5115,14 +5115,14 @@ local_timezone(PyDateTime_DateTime *utc_time)
51155115 return local_timezone_from_timestamp (timestamp );
51165116}
51175117
5118- static PY_LONG_LONG
5118+ static long long
51195119local_to_seconds (int year , int month , int day ,
51205120 int hour , int minute , int second , int fold );
51215121
51225122static PyObject *
51235123local_timezone_from_local (PyDateTime_DateTime * local_dt )
51245124{
5125- PY_LONG_LONG seconds ;
5125+ long long seconds ;
51265126 time_t timestamp ;
51275127 seconds = local_to_seconds (GET_YEAR (local_dt ),
51285128 GET_MONTH (local_dt ),
@@ -5256,11 +5256,11 @@ datetime_timetuple(PyDateTime_DateTime *self)
52565256 dstflag );
52575257}
52585258
5259- static PY_LONG_LONG
5259+ static long long
52605260local_to_seconds (int year , int month , int day ,
52615261 int hour , int minute , int second , int fold )
52625262{
5263- PY_LONG_LONG t , a , b , u1 , u2 , t1 , t2 , lt ;
5263+ long long t , a , b , u1 , u2 , t1 , t2 , lt ;
52645264 t = utc_to_seconds (year , month , day , hour , minute , second );
52655265 /* Our goal is to solve t = local(u) for u. */
52665266 lt = local (t );
@@ -5320,7 +5320,7 @@ datetime_timestamp(PyDateTime_DateTime *self)
53205320 Py_DECREF (delta );
53215321 }
53225322 else {
5323- PY_LONG_LONG seconds ;
5323+ long long seconds ;
53245324 seconds = local_to_seconds (GET_YEAR (self ),
53255325 GET_MONTH (self ),
53265326 GET_DAY (self ),
0 commit comments