public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-python:  * python/python-membuf.c (CHARBUFFERPROC_NAME): New define.
@ 2009-01-08 23:14 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2009-01-08 23:14 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-python has been updated
       via  7cb294ef217a6053836af8acd56e626b95a533dc (commit)
      from  61cda02c121db1b2999a173e56c7de3f0671c728 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 7cb294ef217a6053836af8acd56e626b95a533dc
Author: Tom Tromey <tromey@redhat.com>
Date:   Thu Jan 8 16:13:58 2009 -0700

    	* python/python-membuf.c (CHARBUFFERPROC_NAME): New define.
    	(buffer_procs): Use it.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog              |    5 +++++
 gdb/python/python-membuf.c |    9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0d6622b..fdf8a2b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-08  Tom Tromey  <tromey@redhat.com>
+
+	* python/python-membuf.c (CHARBUFFERPROC_NAME): New define.
+	(buffer_procs): Use it.
+
 2009-01-07  Tom Tromey  <tromey@redhat.com>
 
 	* python/python-membuf.c (buffer_procs): Add compatibility cast.
diff --git a/gdb/python/python-membuf.c b/gdb/python/python-membuf.c
index 1b57da7..df8849d 100644
--- a/gdb/python/python-membuf.c
+++ b/gdb/python/python-membuf.c
@@ -168,13 +168,20 @@ get_char_buffer (PyObject *self, Py_ssize_t segment, char **ptrptr)
   return get_char_buffer (self, segment, ptrptr);
 }
 
+/* Python doesn't provide a decent way to get compatibility here.  */
+#if HAVE_LIBPYTHON2_4
+#define CHARBUFFERPROC_NAME getcharbufferproc
+#else
+#define CHARBUFFERPROC_NAME charbufferproc
+#endif
+
 static PyBufferProcs buffer_procs = {
   get_read_buffer,
   get_write_buffer,
   get_seg_count,
   /* The cast here works around a difference between Python 2.4 and
      Python 2.5.  */
-  (getcharbufferproc) get_char_buffer
+  (CHARBUFFERPROC_NAME) get_char_buffer
 };
 
 static PyTypeObject membuf_object_type = {


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-08 23:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-08 23:14 [SCM] archer-tromey-python: * python/python-membuf.c (CHARBUFFERPROC_NAME): New define tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).