-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-123504: Fix reference leak in initialization of _tkinter
#123505
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
Changes from 2 commits
cddd021
a9eb482
36c65af
cc291e4
df9265f
4f1f4e4
a77abba
f35f2a0
fc34562
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed reference leak in the initalization of :mod:`tkinter`. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3419,8 +3419,9 @@ PyInit__tkinter(void) | |
#endif | ||
|
||
Tkinter_TclError = PyErr_NewException("_tkinter.TclError", NULL, NULL); | ||
if (PyModule_AddObjectRef(m, "TclError", Tkinter_TclError)) { | ||
if (PyModule_AddObject(m, "TclError", Tkinter_TclError)) { | ||
|
||
Py_DECREF(m); | ||
Py_DECREF(Tkinter_TclError); | ||
return NULL; | ||
} | ||
|
||
|
@@ -3470,20 +3471,23 @@ PyInit__tkinter(void) | |
} | ||
|
||
Tkapp_Type = PyType_FromSpec(&Tkapp_Type_spec); | ||
if (PyModule_AddObjectRef(m, "TkappType", Tkapp_Type)) { | ||
if (PyModule_AddObject(m, "TkappType", Tkapp_Type)) { | ||
Py_DECREF(m); | ||
Py_DECREF(Tkapp_Type); | ||
return NULL; | ||
} | ||
|
||
Tktt_Type = PyType_FromSpec(&Tktt_Type_spec); | ||
if (PyModule_AddObjectRef(m, "TkttType", Tktt_Type)) { | ||
if (PyModule_AddObject(m, "TkttType", Tktt_Type)) { | ||
Py_DECREF(m); | ||
Py_DECREF(Tktt_Type); | ||
return NULL; | ||
} | ||
|
||
PyTclObject_Type = PyType_FromSpec(&PyTclObject_Type_spec); | ||
if (PyModule_AddObjectRef(m, "Tcl_Obj", PyTclObject_Type)) { | ||
if (PyModule_AddObject(m, "Tcl_Obj", PyTclObject_Type)) { | ||
Py_DECREF(m); | ||
Py_DECREF(PyTclObject_Type); | ||
return NULL; | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.