Skip to content

Commit 7b008ef

Browse files
committed
Fix PyVectorcall_NARGS() on limited C API 3.12
1 parent cc2c179 commit 7b008ef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎pythoncapi_compat.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,8 @@ static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
632632
#endif
633633

634634
// bpo-36974 added PyVectorcall_NARGS() to Python 3.8b1
635-
#if PY_VERSION_HEX < 0x030800B1 || defined(Py_LIMITED_API)
635+
#if (PY_VERSION_HEX < 0x030800B1 \
636+
|| (defined(Py_LIMITED_API) && PY_VERSION_HEX < 0x030C0000))
636637
static inline Py_ssize_t PyVectorcall_NARGS(size_t n)
637638
{
638639
return n & ~PY_VECTORCALL_ARGUMENTS_OFFSET;

0 commit comments

Comments
 (0)