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

Function record_desc_new

asyncpg/protocol/record/recordobj.c:1067–1090  ·  view source on GitHub ↗

Fallback wrapper for when there is no vectorcall support */

Source from the content-addressed store, hash-verified

1065
1066/* Fallback wrapper for when there is no vectorcall support */
1067static PyObject *
1068record_desc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1069{
1070 PyObject *const *args_array;
1071 size_t nargsf;
1072 PyObject *kwnames = NULL;
1073
1074 if (kwargs != NULL && PyDict_GET_SIZE(kwargs) != 0) {
1075 PyErr_SetString(PyExc_TypeError,
1076 "RecordDescriptor() takes no keyword arguments");
1077 return NULL;
1078 }
1079
1080 if (!PyTuple_Check(args)) {
1081 PyErr_SetString(PyExc_TypeError,
1082 "args must be a tuple");
1083 return NULL;
1084 }
1085
1086 nargsf = (size_t)PyTuple_GET_SIZE(args);
1087 args_array = &PyTuple_GET_ITEM(args, 0);
1088
1089 return record_desc_vectorcall((PyObject *)type, args_array, nargsf, kwnames);
1090}
1091
1092static PyObject *
1093record_desc_make_record(PyObject *desc, PyTypeObject *desc_type,

Callers

nothing calls this directly

Calls 1

record_desc_vectorcallFunction · 0.85

Tested by

no test coverage detected