diff options
Diffstat (limited to 'gdb/python/py-inferior.c')
-rw-r--r-- | gdb/python/py-inferior.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 4b43c54e84..3d2cb1ddbe 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -576,7 +576,10 @@ get_buffer (PyObject *self, Py_buffer *buf, int flags) ret = PyBuffer_FillInfo (buf, self, membuf_obj->buffer, membuf_obj->length, 0, PyBUF_CONTIG); - buf->format = "c"; + + /* Despite the documentation saying this field is a "const char *", + in Python 3.4 at least, it's really a "char *". */ + buf->format = (char *) "c"; return ret; } |