We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c419af9 commit ea35c74Copy full SHA for ea35c74
Objects/moduleobject.c
@@ -826,8 +826,7 @@ module_dealloc(PyObject *self)
826
if (verbose && m->md_name) {
827
PySys_FormatStderr("# destroy %U\n", m->md_name);
828
}
829
- if (m->md_weaklist != NULL)
830
- PyObject_ClearWeakRefs((PyObject *) m);
+ PyObject_ClearWeakRefs(self);
831
832
/* bpo-39824: Don't call m_free() if m_size > 0 and md_state=NULL */
833
if (m->md_def && m->md_def->m_free
0 commit comments