* python/python-internal.h (Py_ssize_t): Define as int.
authorTom Tromey <tromey@redhat.com>
Mon, 5 Jan 2009 20:48:51 +0000 (20:48 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 5 Jan 2009 20:48:51 +0000 (20:48 +0000)
gdb/ChangeLog
gdb/python/python-internal.h

index 94d77a8d2123a89a2adde1ff2f9bc4071b3b2720..b959e9aec2a13040b85b3a1fd98f67a0967ba2cf 100644 (file)
@@ -1,3 +1,7 @@
+2009-01-05  Tom Tromey  <tromey@redhat.com>
+
+       * python/python-internal.h (Py_ssize_t): Define as int.
+
 2009-01-05  Jim Blandy  <jimb@red-bean.com>
 
        * MAINTAINERS: Fix my e-mail address as steering committee member.
index 24d1b447ee2d4c81302beca91aa8c565e4d8ea8f..4e9da3388aec6c1e3f90eb43f97d87f3ebbdfc11 100644 (file)
 
 #if HAVE_LIBPYTHON2_4
 #include "python2.4/Python.h"
-/* Py_ssize_t is not defined until 2.5.  */
-typedef Py_intptr_t Py_ssize_t;
+/* Py_ssize_t is not defined until 2.5.
+   Logical type for Py_ssize_t is Py_intptr_t, but that fails in 64-bit
+   compilation due to several apparent mistakes in python2.4 API, so we
+   use 'int' instead.  */
+typedef int Py_ssize_t;
 #elif HAVE_LIBPYTHON2_5
 #include "python2.5/Python.h"
 #elif HAVE_LIBPYTHON2_6