mirror of
https://github.com/python/cpython.git
synced 2025-10-04 22:20:46 +00:00

Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed, and only includes pycore_runtime.h if _Py_ID() is needed. * Add 'condition' optional argument to Clinic.add_include(). * deprecate_keyword_use() includes pycore_runtime.h when using the _PyID() function. * Fix rendering of includes: comments start at the column 35. * Mark PC/clinic/_wmimodule.cpp.h and "Objects/stringlib/clinic/*.h.h" header files as generated in .gitattributes. Effects: * 42 header files generated by AC no longer include the internal C API, instead of 4 header files before. For example, Modules/clinic/_abc.c.h no longer includes the internal C API. * Fix _testclinic_depr.c.h: it now always includes pycore_runtime.h to get _Py_ID().
57 lines
1.7 KiB
C
Generated
57 lines
1.7 KiB
C
Generated
/*[clinic input]
|
|
preserve
|
|
[clinic start generated code]*/
|
|
|
|
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;
|
|
PyTypeObject *base_tp = clinic_state()->RowType;
|
|
pysqlite_Cursor *cursor;
|
|
PyObject *data;
|
|
|
|
if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
|
|
!_PyArg_NoKeywords("Row", kwargs)) {
|
|
goto exit;
|
|
}
|
|
if (!_PyArg_CheckPositional("Row", PyTuple_GET_SIZE(args), 2, 2)) {
|
|
goto exit;
|
|
}
|
|
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));
|
|
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);
|
|
}
|
|
/*[clinic end generated code: output=972487d535d2e7d5 input=a9049054013a1b77]*/
|