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

Function PyObject_CheckBuffer

python27-sys/src/objectabstract.rs:208–214  ·  view source on GitHub ↗
(obj: *mut PyObject)

Source from the content-addressed store, hash-verified

206
207#[inline]
208pub unsafe fn PyObject_CheckBuffer(obj: *mut PyObject) -> c_int {
209 let t = (*obj).ob_type;
210 let b = (*t).tp_as_buffer;
211 (!b.is_null()
212 && (PyType_HasFeature(t, Py_TPFLAGS_HAVE_NEWBUFFER) != 0)
213 && ((*b).bf_getbuffer.is_some())) as c_int
214}
215
216#[inline]
217pub unsafe fn PyIter_Check(obj: *mut PyObject) -> c_int {

Callers

nothing calls this directly

Calls 1

PyType_HasFeatureFunction · 0.70

Tested by

no test coverage detected