bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10069)
Based on the investigation by Xiang Zhang.
(cherry picked from commit df13df41a2
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
c46f0423a4
commit
f7cefb427c
|
@ -0,0 +1,2 @@
|
|||
Fixed a leak in Tkinter when pass the Python wrapper around Tcl_Obj back to
|
||||
Tcl/Tk.
|
|
@ -1101,9 +1101,7 @@ AsObj(PyObject *value)
|
|||
}
|
||||
|
||||
if (PyTclObject_Check(value)) {
|
||||
Tcl_Obj *v = ((PyTclObject*)value)->value;
|
||||
Tcl_IncrRefCount(v);
|
||||
return v;
|
||||
return ((PyTclObject*)value)->value;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue