From bf64d9064ab641b1ef9a0c4bda097ebf1204faf4 Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Sun, 27 Dec 2020 12:05:33 +0100 Subject: bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170) --- Modules/_sqlite/microprotocols.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Modules/_sqlite/microprotocols.c') diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c index 41f086791e..e219a7239f 100644 --- a/Modules/_sqlite/microprotocols.c +++ b/Modules/_sqlite/microprotocols.c @@ -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"); -- cgit v1.2.1