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

Function PySequence_Fast_ITEMS

python27-sys/src/objectabstract.rs:253–261  ·  view source on GitHub ↗
(o: *mut PyObject)

Source from the content-addressed store, hash-verified

251
252#[inline]
253pub unsafe fn PySequence_Fast_ITEMS(o: *mut PyObject) -> *mut *mut PyObject {
254 if crate::listobject::PyList_Check(o) != 0 {
255 (*(o as *mut crate::listobject::PyListObject)).ob_item
256 } else {
257 (*(o as *mut crate::tupleobject::PyTupleObject))
258 .ob_item
259 .as_mut_ptr()
260 }
261}
262
263#[inline]
264pub unsafe fn PySequence_ITEM(o: *mut PyObject, i: Py_ssize_t) -> *mut PyObject {

Callers

nothing calls this directly

Calls 1

PyList_CheckFunction · 0.70

Tested by

no test coverage detected