diff --git a/pythoncapi_compat.h b/pythoncapi_compat.h index db871f6..fe555e1 100644 --- a/pythoncapi_compat.h +++ b/pythoncapi_compat.h @@ -1198,9 +1198,7 @@ static inline int PyTime_PerfCounter(PyTime_t *result) // gh-111389 added hash constants to Python 3.13.0a5. These constants were // added first as private macros to Python 3.4.0b1 and PyPy 7.3.9. -#if (!defined(PyHASH_BITS) \ - && PY_VERSION_HEX >= 0x030400B1 \ - && (!defined(PYPY_VERSION_NUM) || PYPY_VERSION_NUM >= 0x07030900)) +#if !defined(PyHASH_BITS) && PY_VERSION_HEX >= 0x030400B1 # define PyHASH_BITS _PyHASH_BITS # define PyHASH_MODULUS _PyHASH_MODULUS # define PyHASH_INF _PyHASH_INF diff --git a/tests/test_pythoncapi_compat_cext.c b/tests/test_pythoncapi_compat_cext.c index bdd0123..4c6a666 100644 --- a/tests/test_pythoncapi_compat_cext.c +++ b/tests/test_pythoncapi_compat_cext.c @@ -1522,8 +1522,7 @@ test_hash(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args)) assert(Py_HashPointer(ptr1) == (Py_hash_t)ptr1); #endif -#if PY_VERSION_HEX >= 0x030400B1 \ - && (!defined(PYPY_VERSION_NUM) || PYPY_VERSION_NUM >= 0x07030900) +#if PY_VERSION_HEX >= 0x030400B1 // Just check that constants are available size_t bits = PyHASH_BITS; assert(bits >= 8);