1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4
5 static PyObject *
6 pysqlite_row_new_impl(PyTypeObject *type, pysqlite_Cursor *cursor,
7 PyObject *data);
8
9 static PyObject *
pysqlite_row_new(PyTypeObject * type,PyObject * args,PyObject * kwargs)10 pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11 {
12 PyObject *return_value = NULL;
13 pysqlite_Cursor *cursor;
14 PyObject *data;
15
16 if ((type == clinic_state()->RowType ||
17 type->tp_init == clinic_state()->RowType->tp_init) &&
18 !_PyArg_NoKeywords("Row", kwargs)) {
19 goto exit;
20 }
21 if (!_PyArg_CheckPositional("Row", PyTuple_GET_SIZE(args), 2, 2)) {
22 goto exit;
23 }
24 if (!PyObject_TypeCheck(PyTuple_GET_ITEM(args, 0), clinic_state()->CursorType)) {
25 _PyArg_BadArgument("Row", "argument 1", (clinic_state()->CursorType)->tp_name, PyTuple_GET_ITEM(args, 0));
26 goto exit;
27 }
28 cursor = (pysqlite_Cursor *)PyTuple_GET_ITEM(args, 0);
29 if (!PyTuple_Check(PyTuple_GET_ITEM(args, 1))) {
30 _PyArg_BadArgument("Row", "argument 2", "tuple", PyTuple_GET_ITEM(args, 1));
31 goto exit;
32 }
33 data = PyTuple_GET_ITEM(args, 1);
34 return_value = pysqlite_row_new_impl(type, cursor, data);
35
36 exit:
37 return return_value;
38 }
39
40 PyDoc_STRVAR(pysqlite_row_keys__doc__,
41 "keys($self, /)\n"
42 "--\n"
43 "\n"
44 "Returns the keys of the row.");
45
46 #define PYSQLITE_ROW_KEYS_METHODDEF \
47 {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS, pysqlite_row_keys__doc__},
48
49 static PyObject *
50 pysqlite_row_keys_impl(pysqlite_Row *self);
51
52 static PyObject *
pysqlite_row_keys(pysqlite_Row * self,PyObject * Py_UNUSED (ignored))53 pysqlite_row_keys(pysqlite_Row *self, PyObject *Py_UNUSED(ignored))
54 {
55 return pysqlite_row_keys_impl(self);
56 }
57 /*[clinic end generated code: output=9d54919dbb4ba5f1 input=a9049054013a1b77]*/
58