Files
typthon/Modules/_sqlite/clinic/row.c.h
T
copilot-swe-agent[bot] 42e2356c88 Fix incorrect replacements in Py_ to Ty_ renaming
Fixed several macros and constants that should not have been renamed:
- _Py_CAST, _Py_NULL, _Py_RVALUE (internal utility macros)
- Py_UNUSED (unused parameter macro)
- Py_EQ, Py_NE, Py_LT, Py_LE, Py_GT, Py_GE (comparison constants)
- Py_RETURN_* macros (NONE, TRUE, FALSE, NOTIMPLEMENTED, RICHCOMPARE)
- Py_READONLY, Py_ULL, Py_CONTEXT_SWITCHED
- TyGC_Head in generated clinic files

Build is still in progress with some remaining issues to resolve.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-29 17:44:05 +00:00

60 lines
1.8 KiB
C
Generated

/*[clinic input]
preserve
[clinic start generated code]*/
#include "pycore_modsupport.h" // _TyArg_CheckPositional()
static TyObject *
pysqlite_row_new_impl(TyTypeObject *type, pysqlite_Cursor *cursor,
TyObject *data);
static TyObject *
pysqlite_row_new(TyTypeObject *type, TyObject *args, TyObject *kwargs)
{
TyObject *return_value = NULL;
TyTypeObject *base_tp = clinic_state()->RowType;
pysqlite_Cursor *cursor;
TyObject *data;
if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
!_TyArg_NoKeywords("Row", kwargs)) {
goto exit;
}
if (!_TyArg_CheckPositional("Row", TyTuple_GET_SIZE(args), 2, 2)) {
goto exit;
}
if (!PyObject_TypeCheck(TyTuple_GET_ITEM(args, 0), clinic_state()->CursorType)) {
_TyArg_BadArgument("Row", "argument 1", (clinic_state()->CursorType)->tp_name, TyTuple_GET_ITEM(args, 0));
goto exit;
}
cursor = (pysqlite_Cursor *)TyTuple_GET_ITEM(args, 0);
if (!TyTuple_Check(TyTuple_GET_ITEM(args, 1))) {
_TyArg_BadArgument("Row", "argument 2", "tuple", TyTuple_GET_ITEM(args, 1));
goto exit;
}
data = TyTuple_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 TyObject *
pysqlite_row_keys_impl(pysqlite_Row *self);
static TyObject *
pysqlite_row_keys(TyObject *self, TyObject *Py_UNUSED(ignored))
{
return pysqlite_row_keys_impl((pysqlite_Row *)self);
}
/*[clinic end generated code: output=6c1acbb48f386468 input=a9049054013a1b77]*/