mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -552,8 +552,8 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_
|
|||
if (!args) {
|
||||
goto exit;
|
||||
}
|
||||
if (!PyObject_TypeCheck(args[0], pysqlite_ConnectionType)) {
|
||||
_PyArg_BadArgument("backup", "argument 'target'", (pysqlite_ConnectionType)->tp_name, args[0]);
|
||||
if (!PyObject_TypeCheck(args[0], clinic_state()->ConnectionType)) {
|
||||
_PyArg_BadArgument("backup", "argument 'target'", (clinic_state()->ConnectionType)->tp_name, args[0]);
|
||||
goto exit;
|
||||
}
|
||||
target = (pysqlite_Connection *)args[0];
|
||||
|
@ -710,4 +710,4 @@ exit:
|
|||
#ifndef PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF
|
||||
#define PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF
|
||||
#endif /* !defined(PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF) */
|
||||
/*[clinic end generated code: output=c1bf09db3bcd0105 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=1ee2f6173f4acec3 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue