Removed support for PyPy before Python 3.6

This commit is contained in:
nulano 2022-08-30 14:12:48 +02:00
parent d6e59bc750
commit 54c560f611
No known key found for this signature in database
GPG Key ID: B650CDF63B705766

View File

@ -68,18 +68,7 @@ def _pyimagingtkcall(command, photo, id):
# may raise an error if it cannot attach to Tkinter # may raise an error if it cannot attach to Tkinter
from . import _imagingtk from . import _imagingtk
if hasattr(tk, "interp"): _imagingtk.tkinit(tk.interpaddr())
# Required for PyPy, which always has CFFI installed
from cffi import FFI
ffi = FFI()
# PyPy is using an FFI CDATA element
# (Pdb) self.tk.interp
# <cdata 'Tcl_Interp *' 0x3061b50>
_imagingtk.tkinit(int(ffi.cast("uintptr_t", tk.interp)))
else:
_imagingtk.tkinit(tk.interpaddr())
tk.call(command, photo, id) tk.call(command, photo, id)