From ea94253a12a5ff688ee56f6bd39713c762bce45b Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Fri, 13 Feb 2026 14:00:46 -0700 Subject: [PATCH] Avoid unused variable warning with a debug Python build --- pyo3-ffi/src/refcount.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyo3-ffi/src/refcount.rs b/pyo3-ffi/src/refcount.rs index 03549f787b4..745eaa69a97 100644 --- a/pyo3-ffi/src/refcount.rs +++ b/pyo3-ffi/src/refcount.rs @@ -1,6 +1,6 @@ use crate::pyport::Py_ssize_t; use crate::PyObject; -#[cfg(py_sys_config = "Py_REF_DEBUG")] +#[cfg(all(not(Py_LIMITED_API), py_sys_config = "Py_REF_DEBUG"))] use std::ffi::c_char; #[cfg(Py_3_12)] use std::ffi::c_int;