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

Function PyIndex_Check

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

Source from the content-addressed store, hash-verified

225
226#[inline]
227pub unsafe fn PyIndex_Check(obj: *mut PyObject) -> c_int {
228 let t = (*obj).ob_type;
229 let n = (*t).tp_as_number;
230 (!n.is_null() && PyType_HasFeature(t, Py_TPFLAGS_HAVE_INDEX) != 0 && (*n).nb_index.is_some())
231 as c_int
232}
233
234#[inline]
235pub unsafe fn PySequence_Fast_GET_SIZE(o: *mut PyObject) -> Py_ssize_t {

Callers

nothing calls this directly

Calls 1

PyType_HasFeatureFunction · 0.70

Tested by

no test coverage detected