mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)
This commit is contained in:
parent
3ccef1ca47
commit
bf64d9064a
7 changed files with 45 additions and 82 deletions
|
@ -140,8 +140,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
|
|||
}
|
||||
|
||||
if (alt) {
|
||||
Py_INCREF(alt);
|
||||
return alt;
|
||||
return Py_NewRef(alt);
|
||||
}
|
||||
/* else set the right exception and return NULL */
|
||||
PyErr_SetString(pysqlite_ProgrammingError, "can't adapt");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue