Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
Explain Py_DECREF of converted arguments
  • Loading branch information
Erlend E. Aasland committed Jun 17, 2021
commit 98f1a9d748e71c8e777dc51230d7f2866706a2c6
2 changes: 1 addition & 1 deletion Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pysqlite_connection_init_impl(pysqlite_Connection *self,
(uri ? SQLITE_OPEN_URI : 0), NULL);
Py_END_ALLOW_THREADS

Py_DECREF(database_obj);
Py_DECREF(database_obj); // needed bco. the AC FSConverter

if (rc != SQLITE_OK) {
_pysqlite_seterror(self->db);
Expand Down
2 changes: 1 addition & 1 deletion Modules/_sqlite/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pysqlite_connect_impl(PyObject *module, PyObject *database, double timeout,
timeout, detect_types,
isolation_level, check_same_thread,
factory, cached_statements, uri);
Py_DECREF(database);
Py_DECREF(database); // needed bco. the AC FSConverter
Py_DECREF(isolation_level);
return res;
}
Expand Down