mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-42064: Move sqlite3 types to global state (GH-26537)
* Move connection type to global state * Move cursor type to global state * Move prepare protocol type to global state * Move row type to global state * Move statement type to global state * ADD_TYPE takes a pointer * pysqlite_get_state is now static inline
This commit is contained in:
parent
8ebd9447e9
commit
10a5c806d4
12 changed files with 103 additions and 70 deletions
|
@ -198,7 +198,7 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
|||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *obj;
|
||||
PyObject *proto = (PyObject*)pysqlite_PrepareProtocolType;
|
||||
PyObject *proto = (PyObject *)clinic_state()->PrepareProtocolType;
|
||||
PyObject *alt = NULL;
|
||||
|
||||
if (!_PyArg_CheckPositional("adapt", nargs, 1, 3)) {
|
||||
|
@ -219,4 +219,4 @@ skip_optional:
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=d87990f941c209fa input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=e9c2442673289cab input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue