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

Function record_new

asyncpg/protocol/record/recordobj.c:713–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713static PyObject *
714record_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
715{
716 record_module_state *state;
717
718 state = get_module_state_from_type(type);
719 if (state == NULL) {
720 return NULL;
721 }
722
723 if (type == state->ApgRecord_Type) {
724 PyErr_Format(PyExc_TypeError, "cannot create '%.100s' instances", type->tp_name);
725 return NULL;
726 }
727
728 /* For subclasses, use the default allocation */
729 return type->tp_alloc(type, 0);
730}
731
732static PyMethodDef record_methods[] = {
733 {"values", _PyCFunction_CAST(record_values), METH_METHOD | METH_FASTCALL | METH_KEYWORDS},

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected