diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-02-20 13:32:13 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-02-20 13:32:13 +0100 |
| commit | a284af94d449046116e8c40d1adfac6091a6ffb5 (patch) | |
| tree | 51e882b09209b035ac2bc122d00607f89bb3690c /buffer.h | |
| parent | 99e17811ecb0ee355a8d5aaeab28276892060e1c (diff) | |
| download | vis-a284af94d449046116e8c40d1adfac6091a6ffb5.tar.gz vis-a284af94d449046116e8c40d1adfac6091a6ffb5.tar.xz | |
buffer: add buffer_grow
Diffstat (limited to 'buffer.h')
| -rw-r--r-- | buffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -20,6 +20,8 @@ void buffer_release(Buffer*); void buffer_clear(Buffer*); /* reserve space to store at least size bytes in this buffer.*/ bool buffer_reserve(Buffer*, size_t size); +/* reserve space for at least `len` more bytes in this buffer */ +bool buffer_grow(Buffer*, size_t len); /* if buffer is not empty, make sure it is NUL terminated */ bool buffer_terminate(Buffer*); /* replace buffer content with given data, growing the buffer if needed */ |
