mirror of https://github.com/python/cpython
bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)
This commit is contained in:
parent
4cb7263f0c
commit
5007a4f23c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue