Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Prevent needless memory allocations of SQLite aggregate context
  • Loading branch information
Erlend E. Aasland committed Feb 18, 2021
commit 3470ce0430268f847a7e4d027e5f69956dee8742
2 changes: 1 addition & 1 deletion Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ void _pysqlite_final_callback(sqlite3_context* context)

threadstate = PyGILState_Ensure();

aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*));
aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, 0);
if (!*aggregate_instance) {
/* this branch is executed if there was an exception in the aggregate's
* __init__ */
Expand Down