mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-26 06:35:15 +00:00
Fixed additional patterns: - _PyOpcode_* → _TyOpcode_* (all opcode metadata) - _PyUOpName → _TyUOpName - _PyFunction_* → _TyFunction_* - _PyListIterObject → _TyListIterObject - _Py_T_OBJECT → _Ty_T_OBJECT - Py_BEGIN_ALLOW_THREADS, Py_END_ALLOW_THREADS → Ty_* - PyDoc_STRVAR, PyDoc_STR → TyDoc_* - PyInterpreterState, PyThread_*, PyTime_t → Ty* - PyStructSequence_* → TyStructSequence_* - PyLockStatus → TyLockStatus - PyVarObject_HEAD_INIT → TyVarObject_HEAD_INIT - PyBaseExceptionObject → TyBaseExceptionObject - Fixed _PyExc_ → _TyExc_ in exception macros Build is progressing further. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
60 lines
1.8 KiB
C
Generated
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;
|
|
}
|
|
|
|
TyDoc_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]*/
|