From 5171e6b382aadd794cb3f634c5370be1ba2cb0b2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 5 Jan 2009 20:48:51 +0000 Subject: [PATCH] * python/python-internal.h (Py_ssize_t): Define as int. --- gdb/ChangeLog | 4 ++++ gdb/python/python-internal.h | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 94d77a8d212..b959e9aec2a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-01-05 Tom Tromey + + * python/python-internal.h (Py_ssize_t): Define as int. + 2009-01-05 Jim Blandy * MAINTAINERS: Fix my e-mail address as steering committee member. 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 -- 2.30.2