mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-41861: Convert _sqlite3 CursorType and ConnectionType to heap types (GH-22478)
This commit is contained in:
parent
9031bd4fa4
commit
256e54acdb
6 changed files with 74 additions and 102 deletions
|
@ -82,7 +82,7 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
|
|||
}
|
||||
|
||||
if (factory == NULL) {
|
||||
factory = (PyObject*)&pysqlite_ConnectionType;
|
||||
factory = (PyObject*)pysqlite_ConnectionType;
|
||||
}
|
||||
|
||||
if (PySys_Audit("sqlite3.connect", "O", database) < 0) {
|
||||
|
@ -353,8 +353,8 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
|
|||
|
||||
if (!module ||
|
||||
(pysqlite_row_setup_types(module) < 0) ||
|
||||
(pysqlite_cursor_setup_types() < 0) ||
|
||||
(pysqlite_connection_setup_types() < 0) ||
|
||||
(pysqlite_cursor_setup_types(module) < 0) ||
|
||||
(pysqlite_connection_setup_types(module) < 0) ||
|
||||
(pysqlite_cache_setup_types(module) < 0) ||
|
||||
(pysqlite_statement_setup_types(module) < 0) ||
|
||||
(pysqlite_prepare_protocol_setup_types(module) < 0)
|
||||
|
@ -363,8 +363,8 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ADD_TYPE(module, pysqlite_ConnectionType);
|
||||
ADD_TYPE(module, pysqlite_CursorType);
|
||||
ADD_TYPE(module, *pysqlite_ConnectionType);
|
||||
ADD_TYPE(module, *pysqlite_CursorType);
|
||||
ADD_TYPE(module, *pysqlite_PrepareProtocolType);
|
||||
ADD_TYPE(module, *pysqlite_RowType);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue