Use PyObject_CallObject() instead of _PyObject_CallNoArg()

Also fix type setup in prepare protocols for newer pythons.
This commit is contained in:
Charles Leifer 2022-09-21 08:32:43 -05:00
parent 6b1ceca0ba
commit 1e7c243499
2 changed files with 5 additions and 4 deletions

View file

@ -722,7 +722,7 @@ static void _pysqlite_step_callback(sqlite3_context *context, int argc, sqlite3_
aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*));
if (*aggregate_instance == NULL) {
*aggregate_instance = _PyObject_CallNoArg(aggregate_class);
*aggregate_instance = PyObject_CallObject(aggregate_class, NULL);
if (PyErr_Occurred()) {
*aggregate_instance = 0;
@ -1172,7 +1172,7 @@ static int _progress_handler(void* user_arg)
PyGILState_STATE gilstate;
gilstate = PyGILState_Ensure();
ret = _PyObject_CallNoArg((PyObject*)user_arg);
ret = PyObject_CallObject((PyObject*)user_arg, NULL);
if (!ret) {
if (_pysqlite_enable_callback_tracebacks) {