diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2019-10-08 23:31:34 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-02-24 11:15:32 -0500 |
commit | 5c0c4936b4bc4fe57da0cf1f02ce5df987ab91a2 (patch) | |
tree | 7fca0ac34adf2e64b46d50267e13ea7d8737f34e /src/buffer.h | |
parent | c9f1b612f1852727d9d696222ed392d20f61cdc7 (diff) | |
download | lighttpd-git-5c0c4936b4bc4fe57da0cf1f02ce5df987ab91a2.tar.gz |
[core] __attribute_returns_nonnull__
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index 186a4e52..4f6f9345 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -25,8 +25,13 @@ typedef struct { } buffer; /* create new buffer; either empty or copy given data */ +__attribute_returns_nonnull__ buffer* buffer_init(void); + +__attribute_returns_nonnull__ buffer* buffer_init_buffer(const buffer *src); /* src can be NULL */ + +__attribute_returns_nonnull__ buffer* buffer_init_string(const char *str); /* str can be NULL */ void buffer_free(buffer *b); /* b can be NULL */ @@ -41,6 +46,7 @@ void buffer_move(buffer *b, buffer *src); * sets b to an empty string, and may drop old content. * @return b->ptr */ +__attribute_returns_nonnull__ char* buffer_string_prepare_copy(buffer *b, size_t size); /* allocate buffer large enough to be able to append a string of given size @@ -49,6 +55,7 @@ char* buffer_string_prepare_copy(buffer *b, size_t size); * "used" data is preserved; if not empty buffer must contain a * zero terminated string. */ +__attribute_returns_nonnull__ char* buffer_string_prepare_append(buffer *b, size_t size); /* use after prepare_(copy,append) when you have written data to the buffer |