diff -r 52e49533e7b4 -r 61d5197d612b src/cx/buffer.h --- a/src/cx/buffer.h Mon Dec 18 14:25:10 2023 +0100 +++ b/src/cx/buffer.h Mon Dec 18 15:13:26 2023 +0100 @@ -311,13 +311,27 @@ * Clears the buffer by resetting the position and deleting the data. * * The data is deleted by zeroing it with a call to memset(). + * If you do not need that, you can use the faster cxBufferReset(). * * @param buffer the buffer to be cleared + * @see cxBufferReset() */ __attribute__((__nonnull__)) void cxBufferClear(CxBuffer *buffer); /** + * Resets the buffer by resetting the position and size to zero. + * + * The data in the buffer is not deleted. If you need a safe + * reset of the buffer, use cxBufferClear(). + * + * @param buffer the buffer to be cleared + * @see cxBufferClear() + */ +__attribute__((__nonnull__)) +void cxBufferReset(CxBuffer *buffer); + +/** * Tests, if the buffer position has exceeded the buffer size. * * @param buffer the buffer to test