pub unsafe fn create_py_c_function<'py>(
py: Python<'py>,
method_def: *mut PyMethodDef,
module: Option<&Bound<'py, PyModule>>,
) -> PyResult<Bound<'py, PyCFunction>>Expand description
Creates a PyCFunction object from a PyMethodDef.
§Safety
The method_def pointer must be valid for the lifetime of the returned PyCFunction
(effectively, it must be a static variable).