# HG changeset patch # User Mike Becker # Date 1734696818 -3600 # Node ID c065d196a2c8e1b734aa6f30a201351fc57229c5 # Parent 3e4905241838602f7e8a16fc5aa30d496b037d33 add advice to set the size of a buffer initialized with existing data diff -r 3e4905241838 -r c065d196a2c8 src/cx/buffer.h --- a/src/cx/buffer.h Thu Dec 19 21:33:45 2024 +0100 +++ b/src/cx/buffer.h Fri Dec 20 13:13:38 2024 +0100 @@ -165,6 +165,9 @@ * you will need to cast the pointer, and you should set the * #CX_BUFFER_COPY_ON_WRITE flag. * + * You need to set the size manually after initialization, if + * you provide \p space which already contains data. + * * When you specify stack memory as \p space and decide to use * the auto-extension feature, you \em must use the * #CX_BUFFER_COPY_ON_EXTEND flag, instead of the