@@ -59,19 +59,21 @@ static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self);
5959static PyObject *
6060new_statement_cache (pysqlite_Connection * self , int maxsize )
6161{
62- PyObject * args [] = { PyLong_FromLong (maxsize ), };
63- if (args [0 ] == NULL ) {
62+ PyObject * args [] = { NULL , PyLong_FromLong (maxsize ), };
63+ if (args [1 ] == NULL ) {
6464 return NULL ;
6565 }
6666 PyObject * lru_cache = self -> state -> lru_cache ;
67- PyObject * inner = PyObject_Vectorcall (lru_cache , args , 1 , NULL );
68- Py_DECREF (args [0 ]);
67+ size_t nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET ;
68+ PyObject * inner = PyObject_Vectorcall (lru_cache , args + 1 , nargsf , NULL );
69+ Py_DECREF (args [1 ]);
6970 if (inner == NULL ) {
7071 return NULL ;
7172 }
7273
73- args [0 ] = (PyObject * )self ; // Borrowed ref.
74- PyObject * res = PyObject_Vectorcall (inner , args , 1 , NULL );
74+ args [1 ] = (PyObject * )self ; // Borrowed ref.
75+ nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET ;
76+ PyObject * res = PyObject_Vectorcall (inner , args + 1 , nargsf , NULL );
7577 Py_DECREF (inner );
7678 return res ;
7779}
@@ -1474,8 +1476,9 @@ pysqlite_collation_callback(
14741476
14751477 callback_context * ctx = (callback_context * )context ;
14761478 assert (ctx != NULL );
1477- PyObject * args [] = { string1 , string2 }; // Borrowed refs.
1478- retval = PyObject_Vectorcall (ctx -> callable , args , 2 , NULL );
1479+ PyObject * args [] = { NULL , string1 , string2 }; // Borrowed refs.
1480+ size_t nargsf = 2 | PY_VECTORCALL_ARGUMENTS_OFFSET ;
1481+ retval = PyObject_Vectorcall (ctx -> callable , args + 1 , nargsf , NULL );
14791482 if (retval == NULL ) {
14801483 /* execution failed */
14811484 goto finally ;
0 commit comments