8000 bpo-41861: Convert sqlite3 cache and node types to heap types by erlend-aasland · Pull Request #22417 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-41861: Convert sqlite3 cache and node types to heap types #22417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Prev Previous commit
Next Next commit
Fix dealloc for cache type as well
  • Loading branch information
Erlend E. Aasland committed Sep 26, 2020
commit fad7260d3c5735c63af1df80ae6f15ed2b8b530c
5 changes: 3 additions & 2 deletions Modules/_sqlite/cache.c
7BFD
Original file line numberDiff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int pysqlite_cache_init(pysqlite_Cache* self, PyObject* args, PyObject* kwargs)

void pysqlite_cache_dealloc(pysqlite_Cache* self)
{
PyTypeObject *tp = Py_TYPE(self);
pysqlite_Node* node;
pysqlite_Node* delete_node;

Expand All @@ -112,8 +113,8 @@ void pysqlite_cache_dealloc(pysqlite_Cache* self)
}
Py_DECREF(self->mapping);

Py_TYPE(self)->tp_free((PyObject*)self);
Py_DECREF(pysqlite_CacheType);
tp->tp_free(self);
Py_DECREF(tp);
}

PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key)
Expand Down
0