summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-30 11:55:58 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-30 11:55:58 -0500
commitf10f07553e599f1320afbaa2dfeb0b267139cd74 (patch)
tree760536d599c667f703013feffac1574893aa5a7c /buffer.c
parent642b09558e586d47f172fcfd18c296d400317708 (diff)
more config
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index cdc9f6a..e699548 100644
--- a/buffer.c
+++ b/buffer.c
@@ -92,6 +92,11 @@ static void buffer_append_redo(TextBuffer *buffer, BufferEdit const *edit) {
if (!buffer->redo_history) buffer_out_of_mem(buffer);
}
+static void *buffer_malloc(TextBuffer *buffer, size_t size) {
+ void *ret = malloc(size);
+ if (!ret) buffer_out_of_mem(buffer);
+ return ret;
+}
static void *buffer_calloc(TextBuffer *buffer, size_t n, size_t size) {
void *ret = calloc(n, size);