public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* [python] Fix python-membuf.c:get_char_buffer.
@ 2009-02-20 22:00 Thiago Jung Bauermann
  0 siblings, 0 replies; only message in thread
From: Thiago Jung Bauermann @ 2009-02-20 22:00 UTC (permalink / raw)
  To: archer ml

Hi,

I just pushed this commit which fixes an infinite recursion I noticed
in python-membuf.c.
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


	* python/python-membuf.c (get_char_buffer): Call get_read_buffer.
---
 gdb/python/python-membuf.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/gdb/python/python-membuf.c b/gdb/python/python-membuf.c
index df8849d..d8a8183 100644
--- a/gdb/python/python-membuf.c
+++ b/gdb/python/python-membuf.c
@@ -165,7 +165,13 @@ get_seg_count (PyObject *self, Py_ssize_t *lenp)
 Py_ssize_t
 get_char_buffer (PyObject *self, Py_ssize_t segment, char **ptrptr)
 {
-  return get_char_buffer (self, segment, ptrptr);
+  void *ptr;
+  Py_ssize_t ret;
+
+  ret = get_read_buffer (self, segment, &ptr);
+  *ptrptr = (char *) ptr;
+
+  return ret;
 }
 
 /* Python doesn't provide a decent way to get compatibility here.  */
-- 
1.5.6.5



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

only message in thread, other threads:[~2009-02-20 22:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-20 22:00 [python] Fix python-membuf.c:get_char_buffer Thiago Jung Bauermann

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).