From 930c3c9e43dee8ad65f33d167b0c511cd22f6334 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 5 Sep 2013 00:26:15 +0200 Subject: [PATCH] Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast 64-bit pointer to long (32 bits). --- Misc/NEWS | 3 +++ Modules/_tkinter.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index 7ef400ea888..14201ca4869 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -32,6 +32,9 @@ Core and Builtins Library ------- +- Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast + 64-bit pointer to long (32 bits). + - Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. Patch by Erik Bray. diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 52ee881373f..0627d60b677 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2814,7 +2814,7 @@ Tkapp_InterpAddr(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, ":interpaddr")) return NULL; - return PyInt_FromLong((long)Tkapp_Interp(self)); + return PyLong_FromVoidPtr(Tkapp_Interp(self)); } static PyObject *