From d414f7ece8169097a32cd228bb32da0418833db4 Mon Sep 17 00:00:00 2001 From: Ganesh Kathiresan Date: Mon, 2 May 2022 13:53:28 +0530 Subject: gh-90822: Make `PY_SSIZE_T_MAX` and `PY_SSIZE_T_MIN` constant expression (GH-92071) --- PC/pyconfig.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'PC') diff --git a/PC/pyconfig.h b/PC/pyconfig.h index e8649be568..5a96a4ebe5 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -162,8 +162,10 @@ WIN32 is still required for the locale module. /* Define like size_t, omitting the "unsigned" */ #ifdef MS_WIN64 typedef __int64 Py_ssize_t; +# define PY_SSIZE_T_MAX LLONG_MAX #else typedef _W64 int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX #endif #define HAVE_PY_SSIZE_T 1 -- cgit v1.2.1