summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-07-15 15:49:14 (GMT)
committerGitHub <noreply@github.com>2021-07-15 15:49:14 (GMT)
commit5007a4f23c551f8821483d15e76d0d15d5cb9945 (patch)
tree527ad7b401e825db519e8b98f836e5ec7a1ee36c /Modules/_sqlite
parent4cb7263f0c7199280c01d911a1e7021568b548fd (diff)
downloadcpython-5007a4f23c551f8821483d15e76d0d15d5cb9945.zip
cpython-5007a4f23c551f8821483d15e76d0d15d5cb9945.tar.gz
cpython-5007a4f23c551f8821483d15e76d0d15d5cb9945.tar.bz2
bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)
Diffstat (limited to 'Modules/_sqlite')
-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 64bd53a..63b0fb9 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;
}