]> granicus.if.org Git - python/commitdiff
Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 4 Sep 2013 22:22:24 +0000 (00:22 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 4 Sep 2013 22:22:24 +0000 (00:22 +0200)
64-bit pointer to long (32 bits).

Misc/NEWS
Modules/_tkinter.c

index 9a3ace5ce3af8190e227c33ed51b951f8fc2ea07..c7dbe2993a8946456b1dcf9115fc2f279d3b0bdd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,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.
 
index f049102d9ad4911695016325bd2b9c706d7d25e2..e6b72d3917235c4edd2cce66b1cf7708415d62f2 100644 (file)
@@ -2688,7 +2688,7 @@ Tkapp_InterpAddr(PyObject *self, PyObject *args)
     if (!PyArg_ParseTuple(args, ":interpaddr"))
         return NULL;
 
-    return PyLong_FromLong((long)Tkapp_Interp(self));
+    return PyLong_FromVoidPtr(Tkapp_Interp(self));
 }
 
 static PyObject *