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