pyo3/ffi/
mod.rs

1//! Raw FFI declarations for Python's C API.
2//!
3//! This module provides low level bindings to the Python interpreter.
4//! It is meant for advanced users only - regular PyO3 users shouldn't
5//! need to interact with this module at all.
6//!
7//! The contents of this module are not documented here, as it would entail
8//! basically copying the documentation from CPython. Consult the [Python/C API Reference
9//! Manual][capi] for up-to-date documentation.
10//!
11//! # Safety
12//!
13//! The functions in this module lack individual safety documentation, but
14//! generally the following apply:
15//! - Pointer arguments have to point to a valid Python object of the correct type,
16//!   although null pointers are sometimes valid input.
17//! - The vast majority can only be used safely while the GIL is held.
18//! - Some functions have additional safety requirements, consult the
19//!   [Python/C API Reference Manual][capi] for more information.
20//!
21//! [capi]: https://docs.python.org/3/c-api/index.html
22
23#[cfg(test)]
24mod tests;
25
26//  reexport raw bindings exposed in pyo3_ffi
27pub use pyo3_ffi::*;
28
29/// Helper to enable #\[pymethods\] to see the workaround for __ipow__ on Python 3.7
30#[doc(hidden)]
31pub use crate::impl_::pymethods::ipowfunc;
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here