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

Function PyCFunction_GET_FUNCTION

pyo3-ffi/src/cpython/methodobject.rs:28–33  ·  view source on GitHub ↗
(func: *mut PyObject)

Source from the content-addressed store, hash-verified

26#[cfg(not(GraalPy))]
27#[inline]
28pub unsafe fn PyCFunction_GET_FUNCTION(func: *mut PyObject) -> PyMethodDefPointer {
29 debug_assert_eq!(PyCMethod_Check(func), 1);
30
31 let func = func.cast::<PyCFunctionObject>();
32 (*(*func).m_ml).ml_meth
33}
34
35#[cfg(not(GraalPy))]
36#[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected