From 433953bf14db2833dcec50db0982b745b65b400b Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 26 Mar 2022 20:54:16 +0800 Subject: [PATCH] Mark `METH_FASTCALL` as limited API on Python 3.10+ https://github.com/python/cpython/commit/0b9c4c6fcf2b0673fa45ddfa092934a9d5479b8c#diff-adb492ab0eb13648d50d0d79e4b6e5517b27f983ab3b21b63e77f54132c98e9dR76 --- pyo3-ffi/src/methodobject.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyo3-ffi/src/methodobject.rs b/pyo3-ffi/src/methodobject.rs index 72052735aac..d0afa6f55f5 100644 --- a/pyo3-ffi/src/methodobject.rs +++ b/pyo3-ffi/src/methodobject.rs @@ -179,7 +179,7 @@ pub const METH_COEXIST: c_int = 0x0040; /* METH_FASTCALL indicates the PEP 590 Vectorcall calling format. It may be specified alone or with METH_KEYWORDS. */ -#[cfg(not(Py_LIMITED_API))] +#[cfg(any(Py_3_10, not(Py_LIMITED_API)))] pub const METH_FASTCALL: c_int = 0x0080; // skipped METH_STACKLESS