summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-31 07:26:31 (GMT)
committerGitHub <noreply@github.com>2023-10-31 07:26:31 (GMT)
commitdde5a99ba2173cf1ffbc1692d68000610250eacd (patch)
tree6ddb8a678a91c146127778c4ebedde7393cf663a /Lib/tkinter
parente820d7603bad40c4980633fc9fffea3eafe34236 (diff)
downloadcpython-dde5a99ba2173cf1ffbc1692d68000610250eacd.zip
cpython-dde5a99ba2173cf1ffbc1692d68000610250eacd.tar.gz
cpython-dde5a99ba2173cf1ffbc1692d68000610250eacd.tar.bz2
[3.12] gh-111531: Tkinter: fix reference leaks in bind_class() and bind_all() (GH-111533) (GH-111535)
(cherry picked from commit e3353c498d79f0f3f108a9baf8807a12e77c2ebe) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/tkinter')
-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 c59f8d1..cb3e5f1 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -1459,7 +1459,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."""
@@ -1473,7 +1473,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