bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)

This commit is contained in:
Erlend Egeberg Aasland 2021-07-15 17:49:14 +02:00 committed by GitHub
parent 4cb7263f0c
commit 5007a4f23c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}