MCPcopy Create free account
hub / github.com/PyO3/pyo3 / _PyFunction_CAST

Function _PyFunction_CAST

pyo3-ffi/src/cpython/funcobject.rs:98–101  ·  view source on GitHub ↗
(func: *mut PyObject)

Source from the content-addressed store, hash-verified

96#[inline]
97#[cfg(all(not(PyPy), not(GraalPy)))]
98pub unsafe fn _PyFunction_CAST(func: *mut PyObject) -> *mut PyFunctionObject {
99 assert_eq!(PyFunction_Check(func), 1);
100 func.cast::<PyFunctionObject>()
101}
102
103#[inline]
104#[cfg(all(not(PyPy), not(GraalPy)))]

Callers 7

PyFunction_GET_CODEFunction · 0.85
PyFunction_GET_GLOBALSFunction · 0.85
PyFunction_GET_MODULEFunction · 0.85
PyFunction_GET_DEFAULTSFunction · 0.85
PyFunction_GET_CLOSUREFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected