# HG changeset patch # User Mike Becker # Date 1743003488 -3600 # Node ID f993745c60f08d10dcf28827daf31bfb3b2d3382 # Parent 7cc81244b28ad584740282fdb87331ee9f8ab057 document the buffer flags relates to #451 diff -r 7cc81244b28a -r f993745c60f0 docs/Writerside/topics/buffer.h.md --- a/docs/Writerside/topics/buffer.h.md Wed Mar 26 12:26:20 2025 +0100 +++ b/docs/Writerside/topics/buffer.h.md Wed Mar 26 16:38:08 2025 +0100 @@ -42,6 +42,15 @@ TODO: document +| Flag | Description | +|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| CX_BUFFER_DEFAULT | Alias for zero, meaning no flags are set. | +| CX_BUFFER_FREE_CONTENTS | When the buffer structure is [destroyed](#destroy), the memory for the contents is also automatically deallocated. | +| CX_BUFFER_AUTO_EXTEND | When a write operation would exceed the buffers capacity, the buffer is grown automatically with a call to `cxBufferMinimumCapacity()`. | +| CX_BUFFER_COPY_ON_WRITE | Any write operation will result in allocating a copy of the data, first. This is particularly useful, when a buffer is initialized with read-only memory. | +| CX_BUFFER_COPY_ON_EXTEND | Only when a write operation would exceed the buffers capacity, the copy-on-write operation is performed. This is useful, when a buffer is initialized with read-write memory which is allocated on the stack. | + + ## Destroy ```C