bpo-42064: Convert sqlite3 global state to module state (GH-29073)

This commit is contained in:
Erlend Egeberg Aasland 2021-10-27 13:12:21 +02:00 committed by GitHub
parent 82a662e521
commit 8f24b7dbcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 55 deletions

View file

@ -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]*/