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

Method bitwise_or

src/objectprotocol/number.rs:210–214  ·  view source on GitHub ↗
(&self, py: Python, other: impl ToPyObject)

Source from the content-addressed store, hash-verified

208 /// Invokes the `__or__` magic-method.
209 #[inline]
210 fn bitwise_or(&self, py: Python, other: impl ToPyObject) -> PyResult<PyObject> {
211 other.with_borrowed_ptr(py, |other| unsafe {
212 err::result_from_owned_ptr(py, ffi::PyNumber_Or(self.as_ptr(), other))
213 })
214 }
215 /// Convert this object to an integer,
216 /// equivalent to the builtin function `int(self)`
217 ///

Callers

nothing calls this directly

Implementers 1

number.rssrc/objectprotocol/number.rs

Calls 3

result_from_owned_ptrFunction · 0.85
with_borrowed_ptrMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected