From 491e6376e72e78ee97bd8a5d84e84e9df3cb0171 Mon Sep 17 00:00:00 2001 From: Aleksandr Karpinskii Date: Mon, 2 Sep 2024 12:48:31 +0400 Subject: [PATCH] debug --- src/PIL/ImageTk.py | 2 ++ src/Tk/tkImaging.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/PIL/ImageTk.py b/src/PIL/ImageTk.py index e51eeff6a36..4bc62a54683 100644 --- a/src/PIL/ImageTk.py +++ b/src/PIL/ImageTk.py @@ -51,6 +51,7 @@ def _pyimagingtkcall( command: str, photo: PhotoImage | tkinter.PhotoImage, ptr: object ) -> None: tk = photo.tk + ptr_ref = ptr ptr_str = repr(ptr).strip("<>") try: tk.call(command, photo, ptr_str) @@ -60,6 +61,7 @@ def _pyimagingtkcall( from . import _imagingtk _imagingtk.tkinit(tk.interpaddr()) + print('>>> _pyimagingtkcall ref', ptr_ref) tk.call(command, photo, ptr_str) diff --git a/src/Tk/tkImaging.c b/src/Tk/tkImaging.c index 9c0acdf0875..1b68a31c6db 100644 --- a/src/Tk/tkImaging.c +++ b/src/Tk/tkImaging.c @@ -59,6 +59,9 @@ ImagingFind(const char *name) { PyObject *capsule; const char *expected = "capsule object \"" IMAGING_MAGIC "\" at 0x"; + printf(">>> ImagingFind '%s'", name); + printf(">>> expected '%s'", expected); + if (strncmp(name, expected, strlen(expected))) { return NULL; }