Skip to content

Commit e7747ec

Browse files
authored
Merge pull request #527 from python/main
bpo-44641: Use vectorcall in sqlite3 collation callback (pythonGH-27158)
2 parents c9a84fc + 5007a4f commit e7747ec

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)