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

Method steal_ptr

src/objects/object.rs:174–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

172 #[inline]
173 #[must_use]
174 pub fn steal_ptr(self) -> *mut ffi::PyObject {
175 let ptr = self.as_ptr();
176 mem::forget(self);
177 ptr
178 }
179
180 /// Transmutes an FFI pointer to `&PyObject`.
181 /// Undefined behavior if the pointer is NULL or invalid.

Callers 11

convertMethod · 0.45
new_typeMethod · 0.45
into_normalizedMethod · 0.45
restoreMethod · 0.45
newMethod · 0.45
newMethod · 0.45
set_itemMethod · 0.45
to_py_objectMethod · 0.45
into_py_objectMethod · 0.45
convertMethod · 0.45

Calls 1

as_ptrMethod · 0.45

Tested by

no test coverage detected