There was an error while loading. Please reload this page.
1 parent 3328558 commit bbd2591Copy full SHA for bbd2591
1 file changed
src/native/contextvar.rs
@@ -2,10 +2,9 @@ use pyo3::ffi;
2
use pyo3::prelude::*;
3
use std::ffi::CString;
4
5
-// PyContextVar_New/_Get/_Set are absent from pyo3-ffi's stable/limited-API bindings
6
-// (Py_LIMITED_API), which is activated for Python 3.15+ via PYO3_USE_ABI3_FORWARD_COMPATIBILITY.
7
-// Declare the stable C API locally so this module builds either way. Context variables were
8
-// introduced in Python 3.7, so these symbols are available on every supported interpreter.
+// PyContextVar_* are public CPython C-API symbols (since 3.7), not Limited API.
+// pyo3-ffi omits them under Py_LIMITED_API. Local decls so this module builds
+// when that cfg is on.
9
unsafe extern "C" {
10
fn PyContextVar_New(
11
name: *const std::os::raw::c_char,
0 commit comments