summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index c79a2df..1c41f92 100644
--- a/buffer.c
+++ b/buffer.c
@@ -60,6 +60,10 @@ char const *buffer_geterr(TextBuffer *buffer) {
return buffer->error;
}
+void buffer_clearerr(TextBuffer *buffer) {
+ *buffer->error = '\0';
+}
+
// set the buffer's error to indicate that we're out of memory
static void buffer_out_of_mem(TextBuffer *buffer) {
buffer_seterr(buffer, "Out of memory.");