From: Erlend Egeberg Aasland Date: Thu, 15 Jul 2021 15:49:14 +0000 (+0200) Subject: bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158) X-Git-Tag: v3.11.0a1~666 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5007a4f23c551f8821483d15e76d0d15d5cb9945;p=thirdparty%2FPython%2Fcpython.git bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158) --- diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 64bd53aea7ea..63b0fb9784a0 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; }