summaryrefslogtreecommitdiff
path: root/gdb/python/python-internal.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-01-05 20:48:51 +0000
committerTom Tromey <tromey@redhat.com>2009-01-05 20:48:51 +0000
commit1a00a723098867f4667214ed1a22e2409b347430 (patch)
tree3cb08c5ce3ecb52bfc638403d5654aa96a6a6c36 /gdb/python/python-internal.h
parent88f1dd9c85bc39ec239e934981a0c23416c87f5e (diff)
downloadgdb-1a00a723098867f4667214ed1a22e2409b347430.tar.gz
* python/python-internal.h (Py_ssize_t): Define as int.
Diffstat (limited to 'gdb/python/python-internal.h')
-rw-r--r--gdb/python/python-internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 24d1b447ee2..4e9da3388ae 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -33,8 +33,11 @@
#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