diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-07-15 17:49:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 16:49:14 +0100 |
commit | 5007a4f23c551f8821483d15e76d0d15d5cb9945 (patch) | |
tree | 527ad7b401e825db519e8b98f836e5ec7a1ee36c | |
parent | 4cb7263f0c7199280c01d911a1e7021568b548fd (diff) | |
download | cpython-git-5007a4f23c551f8821483d15e76d0d15d5cb9945.tar.gz |
bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)
-rw-r--r-- | Modules/_sqlite/connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 64bd53aea7..63b0fb9784 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; } |