summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-10-31 06:48:52 (GMT)
committerGitHub <noreply@github.com>2023-10-31 06:48:52 (GMT)
commite3353c498d79f0f3f108a9baf8807a12e77c2ebe (patch)
treeddb9b04f4cf13b9141e0c3d6dbb3df7f25b26912 /Lib
parent3dbaed3caa00062087a848740b6e713ad55b0aed (diff)
downloadcpython-e3353c498d79f0f3f108a9baf8807a12e77c2ebe.zip
cpython-e3353c498d79f0f3f108a9baf8807a12e77c2ebe.tar.gz
cpython-e3353c498d79f0f3f108a9baf8807a12e77c2ebe.tar.bz2
gh-111531: Tkinter: fix reference leaks in bind_class() and bind_all() (GH-111533)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/tkinter/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index 47b93d3..0df7f9d 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -1538,7 +1538,7 @@ class Misc:
An additional boolean parameter ADD specifies whether FUNC will
be called additionally to the other bound function or whether
it will replace the previous function. See bind for the return value."""
- return self._bind(('bind', 'all'), sequence, func, add, 0)
+ return self._root()._bind(('bind', 'all'), sequence, func, add, True)
def unbind_all(self, sequence):
"""Unbind for all widgets for event SEQUENCE all functions."""
@@ -1552,7 +1552,7 @@ class Misc:
whether it will replace the previous function. See bind for
the return value."""
- return self._bind(('bind', className), sequence, func, add, 0)
+ return self._root()._bind(('bind', className), sequence, func, add, True)
def unbind_class(self, className, sequence):
"""Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE