forked from Imagelibrary/binutils-gdb
Use struct buffer in gdb_readline_no_editing
gdb/ChangeLog: 2016-03-09 Pedro Alves <palves@redhat.com> * common/buffer.h (buffer_grow_char): New function. * top.c: Include buffer.h. (gdb_readline_no_editing): Rename 'prompt_arg' parameter to 'prompt'. Use struct buffer instead of xrealloc.
This commit is contained in:
@@ -31,6 +31,15 @@ struct buffer
|
||||
accommodate the new data. */
|
||||
void buffer_grow (struct buffer *buffer, const char *data, size_t size);
|
||||
|
||||
/* Append C to the end of BUFFER. Grows the buffer to accommodate the
|
||||
new data. */
|
||||
|
||||
static inline void
|
||||
buffer_grow_char (struct buffer *buffer, char c)
|
||||
{
|
||||
buffer_grow (buffer, &c, 1);
|
||||
}
|
||||
|
||||
/* Release any memory held by BUFFER. */
|
||||
void buffer_free (struct buffer *buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user