| 
									
										
										
										
											2020-12-29 14:22:55 +01:00
										 |  |  | /*[clinic input]
 | 
					
						
							|  |  |  | preserve | 
					
						
							|  |  |  | [clinic start generated code]*/ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-11 15:25:49 -06:00
										 |  |  | #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
 | 
					
						
							|  |  |  | #  include "pycore_gc.h"            // PyGC_Head
 | 
					
						
							|  |  |  | #  include "pycore_runtime.h"       // _Py_ID()
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-29 14:22:55 +01:00
										 |  |  | static PyObject * | 
					
						
							|  |  |  | pysqlite_row_new_impl(PyTypeObject *type, pysqlite_Cursor *cursor, | 
					
						
							|  |  |  |                       PyObject *data); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject * | 
					
						
							|  |  |  | pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     PyObject *return_value = NULL; | 
					
						
							|  |  |  |     pysqlite_Cursor *cursor; | 
					
						
							|  |  |  |     PyObject *data; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-12 13:27:50 +03:00
										 |  |  |     if ((type == clinic_state()->RowType || | 
					
						
							|  |  |  |          type->tp_init == clinic_state()->RowType->tp_init) && | 
					
						
							| 
									
										
										
										
											2020-12-29 14:22:55 +01:00
										 |  |  |         !_PyArg_NoKeywords("Row", kwargs)) { | 
					
						
							|  |  |  |         goto exit; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     if (!_PyArg_CheckPositional("Row", PyTuple_GET_SIZE(args), 2, 2)) { | 
					
						
							|  |  |  |         goto exit; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-06-15 14:47:34 +02:00
										 |  |  |     if (!PyObject_TypeCheck(PyTuple_GET_ITEM(args, 0), clinic_state()->CursorType)) { | 
					
						
							|  |  |  |         _PyArg_BadArgument("Row", "argument 1", (clinic_state()->CursorType)->tp_name, PyTuple_GET_ITEM(args, 0)); | 
					
						
							| 
									
										
										
										
											2020-12-29 14:22:55 +01:00
										 |  |  |         goto exit; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     cursor = (pysqlite_Cursor *)PyTuple_GET_ITEM(args, 0); | 
					
						
							|  |  |  |     if (!PyTuple_Check(PyTuple_GET_ITEM(args, 1))) { | 
					
						
							|  |  |  |         _PyArg_BadArgument("Row", "argument 2", "tuple", PyTuple_GET_ITEM(args, 1)); | 
					
						
							|  |  |  |         goto exit; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     data = PyTuple_GET_ITEM(args, 1); | 
					
						
							|  |  |  |     return_value = pysqlite_row_new_impl(type, cursor, data); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | exit: | 
					
						
							|  |  |  |     return return_value; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyDoc_STRVAR(pysqlite_row_keys__doc__, | 
					
						
							|  |  |  | "keys($self, /)\n" | 
					
						
							|  |  |  | "--\n" | 
					
						
							|  |  |  | "\n" | 
					
						
							|  |  |  | "Returns the keys of the row."); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define PYSQLITE_ROW_KEYS_METHODDEF    \
 | 
					
						
							|  |  |  |     {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS, pysqlite_row_keys__doc__}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject * | 
					
						
							|  |  |  | pysqlite_row_keys_impl(pysqlite_Row *self); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject * | 
					
						
							|  |  |  | pysqlite_row_keys(pysqlite_Row *self, PyObject *Py_UNUSED(ignored)) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return pysqlite_row_keys_impl(self); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2022-08-11 15:25:49 -06:00
										 |  |  | /*[clinic end generated code: output=87b91f234633702e input=a9049054013a1b77]*/ |