mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-42064: Convert sqlite3
global state to module state (GH-29073)
This commit is contained in:
parent
82a662e521
commit
8f24b7dbcb
8 changed files with 36 additions and 55 deletions
|
@ -279,25 +279,14 @@ PyDoc_STRVAR(pysqlite_cursor_close__doc__,
|
|||
"Closes the cursor.");
|
||||
|
||||
#define PYSQLITE_CURSOR_CLOSE_METHODDEF \
|
||||
{"close", (PyCFunction)(void(*)(void))pysqlite_cursor_close, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pysqlite_cursor_close__doc__},
|
||||
{"close", (PyCFunction)pysqlite_cursor_close, METH_NOARGS, pysqlite_cursor_close__doc__},
|
||||
|
||||
static PyObject *
|
||||
pysqlite_cursor_close_impl(pysqlite_Cursor *self, PyTypeObject *cls);
|
||||
pysqlite_cursor_close_impl(pysqlite_Cursor *self);
|
||||
|
||||
static PyObject *
|
||||
pysqlite_cursor_close(pysqlite_Cursor *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
static const char * const _keywords[] = { NULL};
|
||||
static _PyArg_Parser _parser = {":close", _keywords, 0};
|
||||
|
||||
if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser
|
||||
)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = pysqlite_cursor_close_impl(self, cls);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
return pysqlite_cursor_close_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=3b5328c1619b7626 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=514f6eb4e4974671 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue