Fallback wrapper for when there is no vectorcall support */
| 1065 | |
| 1066 | /* Fallback wrapper for when there is no vectorcall support */ |
| 1067 | static PyObject * |
| 1068 | record_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 | |
| 1092 | static PyObject * |
| 1093 | record_desc_make_record(PyObject *desc, PyTypeObject *desc_type, |
nothing calls this directly
no test coverage detected