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 == pysqlite_RowType) &&
17 !_PyArg_NoKeywords("Row", kwargs)) {
18 goto exit;
19 }
20 if (!_PyArg_CheckPositional("Row", PyTuple_GET_SIZE(args), 2, 2)) {
21 goto exit;
22 }
23 if (!PyObject_TypeCheck(PyTuple_GET_ITEM(args, 0), pysqlite_CursorType)) {
24 _PyArg_BadArgument("Row", "argument 1", (pysqlite_CursorType)->tp_name, PyTuple_GET_ITEM(args, 0));
25 goto exit;
26 }
27 cursor = (pysqlite_Cursor *)PyTuple_GET_ITEM(args, 0);
28 if (!PyTuple_Check(PyTuple_GET_ITEM(args, 1))) {
29 _PyArg_BadArgument("Row", "argument 2", "tuple", PyTuple_GET_ITEM(args, 1));
30 goto exit;
31 }
32 data = PyTuple_GET_ITEM(args, 1);
33 return_value = pysqlite_row_new_impl(type, cursor, data);
34
35 exit:
36 return return_value;
37 }
38
39 PyDoc_STRVAR(pysqlite_row_keys__doc__,
40 "keys($self, /)\n"
41 "--\n"
42 "\n"
43 "Returns the keys of the row.");
44
45 #define PYSQLITE_ROW_KEYS_METHODDEF \
46 {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS, pysqlite_row_keys__doc__},
47
48 static PyObject *
49 pysqlite_row_keys_impl(pysqlite_Row *self);
50
51 static PyObject *
pysqlite_row_keys(pysqlite_Row * self,PyObject * Py_UNUSED (ignored))52 pysqlite_row_keys(pysqlite_Row *self, PyObject *Py_UNUSED(ignored))
53 {
54 return pysqlite_row_keys_impl(self);
55 }
56 /*[clinic end generated code: output=8d29220b9cde035d input=a9049054013a1b77]*/
57