Skip to content

Commit 84714a4

Browse files
committed
Skip pypy & py2
1 parent 5dc083f commit 84714a4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pythoncapi_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ static inline int PyLong_AsUInt64(PyObject *obj, uint64_t *pvalue)
17211721

17221722

17231723
// gh-102471 added import and export API for integers to 3.14.0a2.
1724-
#if PY_VERSION_HEX < 0x030E00A2
1724+
#if PY_VERSION_HEX < 0x030E00A2 && PY_VERSION_HEX >= 0x03000000 && !defined(PYPY_VERSION)
17251725
// Helpers to access PyLongObject internals.
17261726
static inline void
17271727
_PyLong_SetSignAndDigitCount(PyLongObject *op, int sign, Py_ssize_t size)

tests/test_pythoncapi_compat_cext.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ test_long_api(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
14261426
assert(PyLong_IsNegative(obj) == 0);
14271427
assert(PyLong_IsZero(obj) == 0);
14281428

1429+
#if defined(PYTHON3) && !defined(PYPY_VERSION)
14291430
// test import/export API
14301431
digit *digits;
14311432
PyLongWriter *writer;
@@ -1467,6 +1468,7 @@ test_long_api(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
14671468

14681469
assert(layout->digits_order == -1);
14691470
assert(layout->digit_size == sizeof(digit));
1471+
#endif // defined(PYTHON3) && !defined(PYPY_VERSION)
14701472

14711473
Py_RETURN_NONE;
14721474
}

0 commit comments

Comments
 (0)