Skip to content

Commit

Permalink
properly set cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Jul 30, 2024
1 parent e2fa078 commit 369ccb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyo3-ffi/src/compat.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

//! C API Compatibility Shims
//!
//! Some CPython C API functions added in recent versions of Python are
Expand All @@ -14,11 +12,11 @@
use crate::object::PyObject;
use std::os::raw::c_int;

#[cfg_attr(docsrs, doc(cfg()))]
#[cfg_attr(docsrs, doc(cfg(Py_3_13)))]
#[cfg(Py_3_13)]
pub use crate::dictobject::PyDict_GetItemRef;

#[cfg_attr(docsrs, doc(cfg()))]
#[cfg_attr(docsrs, doc(cfg(not(Py_3_13))))]
#[cfg(not(Py_3_13))]
pub unsafe fn PyDict_GetItemRef(
dp: *mut PyObject,
Expand Down
1 change: 1 addition & 0 deletions pyo3-ffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
//! Raw FFI declarations for Python's C API.
//!
//! PyO3 can be used to write native Python modules or run Python code and modules from Rust.
Expand Down

0 comments on commit 369ccb5

Please sign in to comment.