This is the mail archive of the archer@sourceware.org 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] Fix python-membuf.c:get_char_buffer.


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




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