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

Method call

src/objects/typeobject.rs:68–78  ·  view source on GitHub ↗
(&self, py: Python, args: A, kwargs: Option<&PyDict>)

Source from the content-addressed store, hash-verified

66 /// This is equivalent to the Python expression: `self(*args, **kwargs)`
67 #[inline]
68 pub fn call<A>(&self, py: Python, args: A, kwargs: Option<&PyDict>) -> PyResult<PyObject>
69 where
70 A: ToPyObject<ObjectType = PyTuple>,
71 {
72 args.with_borrowed_ptr(py, |args| unsafe {
73 result_from_owned_ptr(
74 py,
75 ffi::PyObject_Call(self.0.as_ptr(), args, kwargs.as_ptr()),
76 )
77 })
78 }
79}
80
81impl PartialEq for PyType {

Callers

nothing calls this directly

Calls 3

result_from_owned_ptrFunction · 0.85
with_borrowed_ptrMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected