MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / record_iter_next

Function record_iter_next

asyncpg/protocol/record/recordobj.c:796–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796static PyObject *
797record_iter_next(ApgRecordIterObject *it)
798{
799 ApgRecordObject *seq;
800 PyObject *item;
801
802 assert(it != NULL);
803 seq = it->it_seq;
804 if (seq == NULL)
805 return NULL;
806
807 if (it->it_index < Py_SIZE(seq)) {
808 item = ApgRecord_GET_ITEM(seq, it->it_index);
809 ++it->it_index;
810 Py_INCREF(item);
811 return item;
812 }
813
814 it->it_seq = NULL;
815 Py_DECREF(seq);
816 return NULL;
817}
818
819static PyObject *
820record_iter_len(ApgRecordIterObject *it)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected