mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -255,7 +255,7 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para
|
|||
if (!_need_adapt(current_param)) {
|
||||
adapted = current_param;
|
||||
} else {
|
||||
adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)&pysqlite_PrepareProtocolType, current_param);
|
||||
adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)pysqlite_PrepareProtocolType, current_param);
|
||||
Py_DECREF(current_param);
|
||||
if (!adapted) {
|
||||
return;
|
||||
|
@ -306,7 +306,7 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para
|
|||
if (!_need_adapt(current_param)) {
|
||||
adapted = current_param;
|
||||
} else {
|
||||
adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)&pysqlite_PrepareProtocolType, current_param);
|
||||
adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)pysqlite_PrepareProtocolType, current_param);
|
||||
Py_DECREF(current_param);
|
||||
if (!adapted) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue