Module compat
Available on crate feature
tls only.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.
Structs§
- PyBytes
Writer Neither Py_3_15norPy_LIMITED_API
Functions§
- PyBytes
Writer_ ⚠Create docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyBytes
Writer_ ⚠Discard docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyBytes
Writer_ ⚠Finish docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyBytes
Writer_ ⚠Finish With Size docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyBytes
Writer_ ⚠GetData docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyBytes
Writer_ ⚠GetSize docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyBytes
Writer_ ⚠Resize docsrsor not (Py_3_15and non-Py_LIMITED_API) - PyDict_
GetItem ⚠Ref docsrsor non-Py_3_13 - PyImport_
AddModule ⚠Ref docsrsor non-Py_3_13 - PyIter_
Next ⚠Item docsrsor non-Py_3_14 - PyList_
Clear ⚠docsrsor non-Py_3_13 - PyList_
Extend ⚠docsrsor non-Py_3_13 - PyList_
GetItem ⚠Ref docsrsor non-Py_3_13 - PyModule_
Add ⚠docsrsor non-Py_3_13 - PyModule_
AddObject ⚠Ref Py_3_10 - PyObject_
Call ⚠Method NoArgs Py_3_9and non-PyPy - PyObject_
Call ⚠NoArgs Non- PyPyand (Py_3_10, or non-Py_LIMITED_APIandPy_3_9) - PyThread
State_ ⚠GetUnchecked docsrsor non-Py_3_13 - PyWeakref_
GetRef ⚠docsrsor non-Py_3_13 - Py_
Hash ⚠Buffer docsrsor not (Py_3_14and non-Py_LIMITED_API) - Py_
NewRef ⚠Py_3_10and (non-Py_LIMITED_APIorPyPy) - Py_
XNew ⚠Ref Py_3_10and (non-Py_LIMITED_APIorPyPy)