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

Function record_new_items_iter

asyncpg/protocol/record/recordobj.c:977–1000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

975};
976
977static PyObject *
978record_new_items_iter(ApgRecordObject *r, const record_module_state *state)
979{
980 ApgRecordItemsObject *it;
981 PyObject *key_iter;
982
983 key_iter = PyObject_GetIter(r->desc->keys);
984 if (key_iter == NULL)
985 return NULL;
986
987 it = PyObject_GC_New(ApgRecordItemsObject, state->ApgRecordItems_Type);
988 if (it == NULL) {
989 Py_DECREF(key_iter);
990 return NULL;
991 }
992
993 it->it_key_iter = key_iter;
994 it->it_index = 0;
995 Py_INCREF(r);
996 it->it_seq = r;
997 PyObject_GC_Track(it);
998
999 return (PyObject *)it;
1000}
1001
1002/* ----------------- */
1003

Callers 1

record_itemsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected