Skip to content

Commit 03e441d

Browse files
authored
Relax PYPY_VERSION_NUM requirements for hash macros (#122)
Those added in pypy/pypy@5661dff which is available in PyPy 7.3.8+.
1 parent 77abeec commit 03e441d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pythoncapi_compat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,11 +1204,11 @@ static inline int PyTime_PerfCounter(PyTime_t *result)
12041204
#endif
12051205

12061206
// gh-111389 added hash constants to Python 3.13.0a5. These constants were
1207-
// added first as private macros to Python 3.4.0b1 and PyPy 7.3.9.
1207+
// added first as private macros to Python 3.4.0b1 and PyPy 7.3.8.
12081208
#if (!defined(PyHASH_BITS) \
12091209
&& ((!defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x030400B1) \
12101210
|| (defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x03070000 \
1211-
&& PYPY_VERSION_NUM >= 0x07090000)))
1211+
&& PYPY_VERSION_NUM >= 0x07030800)))
12121212
# define PyHASH_BITS _PyHASH_BITS
12131213
# define PyHASH_MODULUS _PyHASH_MODULUS
12141214
# define PyHASH_INF _PyHASH_INF

tests/test_pythoncapi_compat_cext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ test_hash(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
16161616

16171617
#if ((!defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x030400B1) \
16181618
|| (defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x03070000 \
1619-
&& PYPY_VERSION_NUM >= 0x07090000))
1619+
&& PYPY_VERSION_NUM >= 0x07030800))
16201620
// Just check that constants are available
16211621
size_t bits = PyHASH_BITS;
16221622
assert(bits >= 8);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy