8000 gh-103092: Isolate _collections by erlend-aasland · Pull Request #103093 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-103092: Isolate _collections #103093

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 22 commits into from
Apr 12, 2023
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 deallocation (hopefully)
  • Loading branch information
kumaraditya303 authored Apr 12, 2023
commit 0381b45ebe868faa44d59bfdb6c6b54241e78b8c
6 changes: 3 additions & 3 deletions Modules/_collectionsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ defdict_dealloc(defdictobject *dd)
PyTypeObject *tp = Py_TYPE(dd);
PyObject_GC_UnTrack(dd);
Py_CLEAR(dd->default_factory);
tp->tp_free(dd);
PyDict_Type.tp_dealloc((PyObject *)dd);
Py_DECREF(tp);
}

Expand Down Expand Up @@ -2154,14 +2154,14 @@ defdict_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(((defdictobject *)self)->default_factory);
return 0;
return PyDict_Type.tp_traverse(self, visit, arg);
}

static int
defdict_tp_clear(defdictobject *dd)
{
Py_CLEAR(dd->default_factory);
return 0;
return PyDict_Type.tp_clear((PyObject *)dd);
}

static int
Expand Down
0