Skip to content

Commit bbd2591

Browse files
chore(native): drop "stable C API" from PyContextVar decls comment
1 parent 3328558 commit bbd2591

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/native/contextvar.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ use pyo3::ffi;
22
use pyo3::prelude::*;
33
use std::ffi::CString;
44

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.
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.
98
unsafe extern "C" {
109
fn PyContextVar_New(
1110
name: *const std::os::raw::c_char,

0 commit comments

Comments
 (0)