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 491e637
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PIL/ImageTk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -60,6 +61,7 @@ def _pyimagingtkcall(
from . import _imagingtk

_imagingtk.tkinit(tk.interpaddr())
print('>>> _pyimagingtkcall ref', ptr_ref)
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;

Check warning on line 66 in src/Tk/tkImaging.c

View check run for this annotation

Codecov / codecov/patch

src/Tk/tkImaging.c#L66

Added line #L66 was not covered by tests
}
Expand Down

0 comments on commit 491e637

Please sign in to comment.