MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / py_fn_impl

Function py_fn_impl

src/function.rs:164–166  ·  view source on GitHub ↗
(py: Python, method_def: *mut ffi::PyMethodDef)

Source from the content-addressed store, hash-verified

162}
163
164pub unsafe fn py_fn_impl(py: Python, method_def: *mut ffi::PyMethodDef) -> PyObject {
165 err::from_owned_ptr_or_panic(py, ffi::PyCFunction_New(method_def, ptr::null_mut()))
166}
167
168pub trait CallbackConverter<S> {
169 type R;

Callers

nothing calls this directly

Calls 2

from_owned_ptr_or_panicFunction · 0.85
PyCFunction_NewFunction · 0.50

Tested by

no test coverage detected