mirror of
https://github.com/python/cpython.git
synced 2025-11-01 22:21:35 +00:00
bpo-41861: Convert _sqlite3 PrepareProtocolType to heap type (GH-22428)
This commit is contained in:
parent
d332e7b816
commit
cb6db8b6ae
5 changed files with 33 additions and 54 deletions
|
|
@ -56,7 +56,7 @@ pysqlite_microprotocols_add(PyTypeObject *type, PyObject *proto, PyObject *cast)
|
|||
PyObject* key;
|
||||
int rc;
|
||||
|
||||
if (proto == NULL) proto = (PyObject*)&pysqlite_PrepareProtocolType;
|
||||
if (proto == NULL) proto = (PyObject*)pysqlite_PrepareProtocolType;
|
||||
|
||||
key = Py_BuildValue("(OO)", (PyObject*)type, proto);
|
||||
if (!key) {
|
||||
|
|
@ -152,7 +152,7 @@ PyObject *
|
|||
pysqlite_adapt(pysqlite_Cursor *self, PyObject *args)
|
||||
{
|
||||
PyObject *obj, *alt = NULL;
|
||||
PyObject *proto = (PyObject*)&pysqlite_PrepareProtocolType;
|
||||
PyObject *proto = (PyObject*)pysqlite_PrepareProtocolType;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O|OO", &obj, &proto, &alt)) return NULL;
|
||||
return pysqlite_microprotocols_adapt(obj, proto, alt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue