diff options
Diffstat (limited to 'core/membuffer.h')
-rw-r--r-- | core/membuffer.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/core/membuffer.h b/core/membuffer.h index 03c42a61d..6d497371c 100644 --- a/core/membuffer.h +++ b/core/membuffer.h @@ -23,17 +23,13 @@ * * "something, something else" * - * Unless ownership to the buffer is given away say to a caller + * Unless ownership to the buffer is given away by using "detach_cstring()": * - * mb_cstring(&mb); - * return detach_buffer(&mb); - * - * or via a callback + * ptr = detach_cstring(); * - * mb_cstring(&mb); - * cb(detach_buffer(&mb)); + * where the caller now has a C string and is supposed to free it. * - * otherwise allocated memory should be freed + * Otherwise allocated memory should be freed * * free_buffer(&mb); */ @@ -60,7 +56,7 @@ struct membuffer { #define __printf(x, y) #endif -extern char *detach_buffer(struct membuffer *b); +extern char *detach_cstring(struct membuffer *b); extern void free_buffer(struct membuffer *); extern void make_room(struct membuffer *b, unsigned int size); extern void flush_buffer(struct membuffer *, FILE *); |