Skip to content

Commit 321b3e0

Browse files
committed
Used Py_BuildValue().
1 parent f3bab47 commit 321b3e0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Modules/_sqlite/connection.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,17 +2004,10 @@ pysqlite_connection_iterdump_impl(pysqlite_Connection *self,
20042004
return NULL;
20052005
}
20062006
PyObject *args[2] = {(PyObject *)self, filter};
2007-
PyObject *kwnames = PyTuple_New(1);
2008-
PyObject *py_filter = NULL;
2009-
2007+
PyObject *kwnames = Py_BuildValue("(s)", "filter");
20102008
if (!kwnames) {
20112009
goto error;
20122010
}
2013-
py_filter = PyUnicode_FromString("filter");
2014-
if (!py_filter) {
2015-
goto error;
2016-
}
2017-
PyTuple_SET_ITEM(kwnames, 0, py_filter);
20182011

20192012
PyObject *retval = PyObject_Vectorcall(iterdump, args, 1, kwnames);
20202013
Py_DECREF(iterdump);

0 commit comments

Comments
 (0)