[Python-checkins] Fix _PyTime_MIN/MAX values (GH-15384)

Miss Islington (bot) webhook-mailer at python.org
Fri Aug 23 11:56:55 EDT 2019


https://github.com/python/cpython/commit/8fac472436cccaf936732273eeb11649e2d8355d
commit: 8fac472436cccaf936732273eeb11649e2d8355d
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-08-23T08:56:51-07:00
summary:

Fix _PyTime_MIN/MAX values (GH-15384)


_PyTime_t type is defined as int64_t, and so min/max are INT64_MIN/INT64_MAX,
not PY_LLONG_MIN/PY_LLONG_MAX.
(cherry picked from commit 8e76c456226438f2e4931ce7baf05ac8faae34a1)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey at gmail.com>

files:
M Include/pytime.h

diff --git a/Include/pytime.h b/Include/pytime.h
index 4870a9df5b46..bdda1da2e6b8 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -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).



More information about the Python-checkins mailing list