Skip to content

Commit 5007a4f

Browse files
author
Erlend Egeberg Aasland
authored
bpo-44641: Use vectorcall in sqlite3 collation callback (pythonGH-27158)
1 parent 4cb7263 commit 5007a4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_sqlite/connection.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,9 +1494,9 @@ pysqlite_collation_callback(
14941494
goto finally; /* failed to allocate strings */
14951495
}
14961496

1497-
retval = PyObject_CallFunctionObjArgs(callback, string1, string2, NULL);
1498-
1499-
if (!retval) {
1497+
PyObject *args[] = { string1, string2 }; // Borrowed refs.
1498+
retval = PyObject_Vectorcall(callback, args, 2, NULL);
1499+
if (retval == NULL) {
15001500
/* execution failed */
15011501
goto finally;
15021502
}

0 commit comments

Comments
 (0)