Skip to content

Commit 10db853

Browse files
committed
debug
1 parent 392976f commit 10db853

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/PIL/ImageTk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def _pyimagingtkcall(
5252
) -> None:
5353
tk = photo.tk
5454
ptr_str = repr(ptr).strip("<>")
55+
# Replace pointer to actual one for pypy
56+
ptr_str = ptr_str.rpartition("0x")[0] + hex(id(ptr))
5557
try:
5658
tk.call(command, photo, ptr_str)
5759
except tkinter.TclError:
@@ -60,6 +62,7 @@ def _pyimagingtkcall(
6062
from . import _imagingtk
6163

6264
_imagingtk.tkinit(tk.interpaddr())
65+
print(">>> _pyimagingtkcall ref", ptr_str)
6366
tk.call(command, photo, ptr_str)
6467

6568

src/Tk/tkImaging.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ ImagingFind(const char *name) {
5959
PyObject *capsule;
6060
const char *expected = "capsule object \"" IMAGING_MAGIC "\" at 0x";
6161

62+
printf(">>> ImagingFind '%s'", name);
63+
printf(">>> expected '%s'", expected);
64+
6265
if (strncmp(name, expected, strlen(expected))) {
6366
return NULL;
6467
}

0 commit comments

Comments
 (0)