void _pysqlite_final_callback(sqlite3_context* context)
{
- PyObject* function_result = NULL;
+ PyObject* function_result;
PyObject** aggregate_instance;
- PyObject* aggregate_class;
+ _Py_IDENTIFIER(finalize);
+ int ok;
#ifdef WITH_THREAD
PyGILState_STATE threadstate;
goto error;
}
- function_result = PyObject_CallMethod(*aggregate_instance, "finalize", "");
+ function_result = _PyObject_CallMethodId(*aggregate_instance, &PyId_finalize, "");
- if (!function_result) {
+ Py_DECREF(*aggregate_instance);
+
+ ok = 0;
+ if (function_result) {
+ ok = _pysqlite_set_result(context, function_result) == 0;
+ Py_DECREF(function_result);
+ }
+ if (!ok) {
if (_enable_callback_tracebacks) {
PyErr_Print();
} else {
return rc;
}
-int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter, int allow_8bit_chars)
+int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter)
{
int rc = SQLITE_OK;
- PY_LONG_LONG longlongval;
const char* buffer;
char* string;
Py_ssize_t buflen;