MCPcopy Create free account
hub / github.com/apache/fory / py_sequence_get_items

Function py_sequence_get_items

python/pyfory/cpp/pyfory.cc:45–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43#endif
44
45static PyObject **py_sequence_get_items(PyObject *collection) {
46 if (PyList_CheckExact(collection)) {
47 return ((PyListObject *)collection)->ob_item;
48 } else if (PyTuple_CheckExact(collection)) {
49 return ((PyTupleObject *)collection)->ob_item;
50 }
51 return nullptr;
52}
53
54namespace fory {
55

Calls

no outgoing calls

Tested by

no test coverage detected