gh-90822: Make PY_SSIZE_T_MAX and PY_SSIZE_T_MIN constant expression (GH-92071)

This commit is contained in:
Ganesh Kathiresan 2022-05-02 13:53:28 +05:30 committed by GitHub
parent 4d10f703d7
commit d414f7ece8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -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