Mercurial > dovecot > core-2.2
changeset 23007:36e01285b5b8
lib: buffer - Improve header comment for buffer_insert() and buffer_delete().
author | Stephan Bosch <stephan.bosch@dovecot.fi> |
---|---|
date | Mon, 18 Mar 2019 00:52:37 +0100 |
parents | 0cf75c25fd26 |
children | d7ad84cec527 |
files | src/lib/buffer.h |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/buffer.h Mon Feb 04 19:25:13 2019 -0800 +++ b/src/lib/buffer.h Mon Mar 18 00:52:37 2019 +0100 @@ -51,10 +51,13 @@ /* Append character to buffer. */ void buffer_append_c(buffer_t *buf, unsigned char chr); -/* Insert data to buffer. */ +/* Insert the provided data into the buffer at position pos. If pos points past + the current buffer size, the gap is zero-filled. */ void buffer_insert(buffer_t *buf, size_t pos, const void *data, size_t data_size); -/* Delete data from buffer. */ +/* Delete data with the indicated size from the buffer at position pos. The + deleted block may cross the current buffer size boundary, which is ignored. + */ void buffer_delete(buffer_t *buf, size_t pos, size_t size); /* Fill buffer with zero bytes. */