]> granicus.if.org Git - python/commitdiff
Fix _PyTime_MIN/MAX values (GH-15384)
authorSergey Fedoseev <fedoseev.sergey@gmail.com>
Fri, 23 Aug 2019 15:39:09 +0000 (20:39 +0500)
committerVictor Stinner <vstinner@redhat.com>
Fri, 23 Aug 2019 15:39:09 +0000 (16:39 +0100)
_PyTime_t type is defined as int64_t, and so min/max are INT64_MIN/INT64_MAX,
not PY_LLONG_MIN/PY_LLONG_MAX.

Include/pytime.h

index 4870a9df5b46c8019fb4ef0832778dca1a541f32..bdda1da2e6b8f2ec6bce29688a67f8137f7d9208 100644 (file)
@@ -17,8 +17,8 @@ extern "C" {
    store a duration, and so indirectly a date (related to another date, like
    UNIX epoch). */
 typedef int64_t _PyTime_t;
-#define _PyTime_MIN PY_LLONG_MIN
-#define _PyTime_MAX PY_LLONG_MAX
+#define _PyTime_MIN INT64_MIN
+#define _PyTime_MAX INT64_MAX
 
 typedef enum {
     /* Round towards minus infinity (-inf).