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) {
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 5ceeaf9..08604b9 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -310,7 +310,7 @@
         factory = (PyObject*)&pysqlite_CursorType;
     }
 
-    cursor = PyObject_CallFunctionObjArgs(factory, (PyObject *)self, NULL);
+    cursor = _PyObject_CallOneArg(factory, (PyObject *)self);
     if (cursor == NULL)
         return NULL;
     if (!PyObject_TypeCheck(cursor, &pysqlite_CursorType)) {
@@ -970,7 +970,7 @@
     py_statement = PyUnicode_DecodeUTF8(statement_string,
             strlen(statement_string), "replace");
     if (py_statement) {
-        ret = PyObject_CallFunctionObjArgs((PyObject*)user_arg, py_statement, NULL);
+        ret = _PyObject_CallOneArg((PyObject*)user_arg, py_statement);
         Py_DECREF(py_statement);
     }
 
@@ -1465,16 +1465,9 @@
         goto finally;
     }
 
-    args = PyTuple_New(1);
-    if (!args) {
-        goto finally;
-    }
-    Py_INCREF(self);
-    PyTuple_SetItem(args, 0, (PyObject*)self);
-    retval = PyObject_CallObject(pyfn_iterdump, args);
+    retval = _PyObject_CallOneArg(pyfn_iterdump, (PyObject *)self);
 
 finally:
-    Py_XDECREF(args);
     Py_XDECREF(module);
     return retval;
 }
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 38d94b2..e6fcac8 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -266,7 +266,7 @@
                 item = PyBytes_FromStringAndSize(val_str, nbytes);
                 if (!item)
                     goto error;
-                converted = PyObject_CallFunction(converter, "O", item);
+                converted = _PyObject_CallOneArg(converter, item);
                 Py_DECREF(item);
             }
         } else {
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c
index c23b09f..59a5e22 100644
--- a/Modules/_sqlite/microprotocols.c
+++ b/Modules/_sqlite/microprotocols.c
@@ -92,7 +92,7 @@
     Py_DECREF(key);
     if (adapter) {
         Py_INCREF(adapter);
-        adapted = PyObject_CallFunctionObjArgs(adapter, obj, NULL);
+        adapted = _PyObject_CallOneArg(adapter, obj);
         Py_DECREF(adapter);
         return adapted;
     }
@@ -105,7 +105,7 @@
         return NULL;
     }
     if (adapter) {
-        adapted = PyObject_CallFunctionObjArgs(adapter, obj, NULL);
+        adapted = _PyObject_CallOneArg(adapter, obj);
         Py_DECREF(adapter);
 
         if (adapted == Py_None) {
@@ -124,7 +124,7 @@
         return NULL;
     }
     if (adapter) {
-        adapted = PyObject_CallFunctionObjArgs(adapter, proto, NULL);
+        adapted = _PyObject_CallOneArg(adapter, proto);
         Py_DECREF(adapter);
 
         if (adapted == Py_None) {