This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] build fix for python 2.4

I needed this to be able to build the python branch using python 2.4.

Python's API changed incompatibly here -- they removed a `const' that
was there in 2.4.  This patch hacks around it with a cast.

I needed this patch and the previous one to get a baseline for the
master->python merge.  I'll check that in once the regression testing
is done.


2009-01-07  Tom Tromey  <>

	* python/python-membuf.c (buffer_procs): Add compatibility cast.

diff --git a/gdb/python/python-membuf.c b/gdb/python/python-membuf.c
index f4a500f..1b57da7 100644
--- a/gdb/python/python-membuf.c
+++ b/gdb/python/python-membuf.c
@@ -1,6 +1,6 @@
 /* Python interface to the inferior memory.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
    This file is part of GDB.
@@ -172,7 +172,9 @@ static PyBufferProcs buffer_procs = {
-  get_char_buffer
+  /* The cast here works around a difference between Python 2.4 and
+     Python 2.5.  */
+  (getcharbufferproc) get_char_buffer
 static PyTypeObject membuf_object_type = {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]