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

Function PyIter_Check

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

Source from the content-addressed store, hash-verified

215
216#[inline]
217pub unsafe fn PyIter_Check(obj: *mut PyObject) -> c_int {
218 let t = (*obj).ob_type;
219 (PyType_HasFeature(t, Py_TPFLAGS_HAVE_ITER) != 0
220 && match (*t).tp_iternext {
221 None => false,
222 Some(f) => f as *const c_void != _PyObject_NextNotImplemented as *const c_void,
223 }) as c_int
224}
225
226#[inline]
227pub unsafe fn PyIndex_Check(obj: *mut PyObject) -> c_int {

Callers

nothing calls this directly

Calls 1

PyType_HasFeatureFunction · 0.70

Tested by

no test coverage detected