summaryrefslogtreecommitdiff
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 5ceeaf98ee..08604b99a6 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -310,7 +310,7 @@ PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args,
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 @@ static void _trace_callback(void* user_arg, const char* statement_string)
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 @@ pysqlite_connection_iterdump(pysqlite_Connection* self, PyObject* args)
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;
}