Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
homm committed Sep 2, 2024
1 parent 392976f commit 10db853
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PIL/ImageTk.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def _pyimagingtkcall(
) -> None:
tk = photo.tk
ptr_str = repr(ptr).strip("<>")
# Replace pointer to actual one for pypy
ptr_str = ptr_str.rpartition("0x")[0] + hex(id(ptr))
try:
tk.call(command, photo, ptr_str)
except tkinter.TclError:
Expand All @@ -60,6 +62,7 @@ def _pyimagingtkcall(
from . import _imagingtk

_imagingtk.tkinit(tk.interpaddr())
print(">>> _pyimagingtkcall ref", ptr_str)
tk.call(command, photo, ptr_str)


Expand Down
3 changes: 3 additions & 0 deletions src/Tk/tkImaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 10db853

Please sign in to comment.