pyo3::ffi

Module compat

Source
Expand description

C API Compatibility Shims

Some CPython C API functions added in recent versions of Python are inherently safer to use than older C API constructs. This module exposes functions available on all Python versions that wrap the old C API on old Python versions and wrap the function directly on newer Python versions.

Functions§

PyDict_GetItemRefdocsrs or non-Py_3_13
PyImport_AddModuleRefdocsrs or non-Py_3_13
PyList_Cleardocsrs or non-Py_3_13
PyList_Extenddocsrs or non-Py_3_13
PyList_GetItemRefdocsrs or non-Py_3_13
PyObject_CallMethodNoArgsdocsrs or not (Py_3_9 and neither Py_LIMITED_API nor PyPy nor GraalPy)
PyObject_CallNoArgsdocsrs or not (non-PyPy and non-GraalPy and (Py_3_10, or non-Py_LIMITED_API and Py_3_9))
PyWeakref_GetRefdocsrs or non-Py_3_13
Py_NewRefdocsrs or non-Py_3_10
Py_XNewRefdocsrs or non-Py_3_10
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here