bpo-41861: Convert _sqlite3 PrepareProtocolType to heap type (GH-22428)

This commit is contained in:
Erlend Egeberg Aasland 2020-09-29 00:05:04 +02:00 committed by GitHub
parent d332e7b816
commit cb6db8b6ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 54 deletions

View file

@ -176,7 +176,7 @@ static PyObject* module_register_adapter(PyObject* self, PyObject* args)
pysqlite_BaseTypeAdapted = 1;
}
rc = pysqlite_microprotocols_add(type, (PyObject*)&pysqlite_PrepareProtocolType, caster);
rc = pysqlite_microprotocols_add(type, (PyObject*)pysqlite_PrepareProtocolType, caster);
if (rc == -1)
return NULL;
@ -357,7 +357,7 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
(pysqlite_connection_setup_types() < 0) ||
(pysqlite_cache_setup_types(module) < 0) ||
(pysqlite_statement_setup_types() < 0) ||
(pysqlite_prepare_protocol_setup_types() < 0)
(pysqlite_prepare_protocol_setup_types(module) < 0)
) {
Py_XDECREF(module);
return NULL;
@ -365,7 +365,7 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
ADD_TYPE(module, pysqlite_ConnectionType);
ADD_TYPE(module, pysqlite_CursorType);
ADD_TYPE(module, pysqlite_PrepareProtocolType);
ADD_TYPE(module, *pysqlite_PrepareProtocolType);
ADD_TYPE(module, pysqlite_RowType);
if (!(dict = PyModule_GetDict(module))) {