diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-30 11:55:58 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-30 11:55:58 -0500 |
commit | f10f07553e599f1320afbaa2dfeb0b267139cd74 (patch) | |
tree | 760536d599c667f703013feffac1574893aa5a7c /buffer.c | |
parent | 642b09558e586d47f172fcfd18c296d400317708 (diff) |
more config
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |