summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-07-15 17:49:14 +0200
committerGitHub <noreply@github.com>2021-07-15 16:49:14 +0100
commit5007a4f23c551f8821483d15e76d0d15d5cb9945 (patch)
tree527ad7b401e825db519e8b98f836e5ec7a1ee36c
parent4cb7263f0c7199280c01d911a1e7021568b548fd (diff)
downloadcpython-git-5007a4f23c551f8821483d15e76d0d15d5cb9945.tar.gz
bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)
-rw-r--r--Modules/_sqlite/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 64bd53aea7..63b0fb9784 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -1494,9 +1494,9 @@ pysqlite_collation_callback(
goto finally; /* failed to allocate strings */
}
- retval = PyObject_CallFunctionObjArgs(callback, string1, string2, NULL);
-
- if (!retval) {
+ PyObject *args[] = { string1, string2 }; // Borrowed refs.
+ retval = PyObject_Vectorcall(callback, args, 2, NULL);
+ if (retval == NULL) {
/* execution failed */
goto finally;
}