aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common/buffer.h')
-rw-r--r--gdb/common/buffer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/common/buffer.h b/gdb/common/buffer.h
index 2a47db4..8122a2c 100644
--- a/gdb/common/buffer.h
+++ b/gdb/common/buffer.h
@@ -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);