bpo-37483: add _PyObject_CallOneArg() function (#14558)
diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
index 4d41804..7552d1b 100644
--- a/Modules/_sqlite/cache.c
+++ b/Modules/_sqlite/cache.c
@@ -112,9 +112,8 @@
Py_TYPE(self)->tp_free((PyObject*)self);
}
-PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* args)
+PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key)
{
- PyObject* key = args;
pysqlite_Node* node;
pysqlite_Node* ptr;
PyObject* data;
@@ -184,6 +183,9 @@
}
}
+ /* We cannot replace this by _PyObject_CallOneArg() since
+ * PyObject_CallFunction() has a special case when using a
+ * single tuple as argument. */
data = PyObject_CallFunction(self->factory, "O", key);
if (!data) {