[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit,

victor.stinner python-checkins at python.org
Thu Sep 5 00:28:28 CEST 2013


http://hg.python.org/cpython/rev/ac27d979078a
changeset:   85532:ac27d979078a
parent:      85529:b5530669ef70
parent:      85531:f01e06d26b41
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Sep 05 00:23:08 2013 +0200
summary:
  (Merge 3.3) Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit,
don't cast 64-bit pointer to long (32 bits).

files:
  Misc/NEWS          |  3 +++
  Modules/_tkinter.c |  2 +-
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -54,6 +54,9 @@
 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
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -2462,7 +2462,7 @@
     if (!PyArg_ParseTuple(args, ":interpaddr"))
         return NULL;
 
-    return PyLong_FromLong((long)Tkapp_Interp(self));
+    return PyLong_FromVoidPtr(Tkapp_Interp(self));
 }
 
 static PyObject *

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list