From 5007a4f23c551f8821483d15e76d0d15d5cb9945 Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Thu, 15 Jul 2021 17:49:14 +0200 Subject: bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158) --- Modules/_sqlite/connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 64bd53a..63b0fb9 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; } -- cgit v0.12