summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-11-08 21:49:33 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-11-12 21:56:05 -0500
commit5fe9339942761065a00fd1414e18baa6abd60258 (patch)
tree9af7c445a683674bc0b8d0d9753c880da9adbb97 /src/buffer.h
parent8c0792a58c24d6f3dd07071d3694e90281cdf3ce (diff)
downloadlighttpd-git-5fe9339942761065a00fd1414e18baa6abd60258.tar.gz
[core] perf: inline buffer_append_string_buffer()
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 51dd119c..f4f6556f 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -71,7 +71,7 @@ void buffer_copy_buffer(buffer *b, const buffer *src);
void buffer_append_string(buffer *b, const char *s);
void buffer_append_string_len(buffer *b, const char *s, size_t s_len);
-void buffer_append_string_buffer(buffer *b, const buffer *src);
+static inline void buffer_append_string_buffer(buffer *b, const buffer *src);
#define buffer_append_uint_hex(b,len) buffer_append_uint_hex_lc((b),(len))
void buffer_append_uint_hex_lc(buffer *b, uintmax_t len);
@@ -199,6 +199,10 @@ static inline size_t buffer_string_space(const buffer *b) {
return b->size - b->used;
}
+static inline void buffer_append_string_buffer(buffer *b, const buffer *src) {
+ buffer_append_string_len(b, CONST_BUF_LEN(src));
+}
+
static inline void buffer_append_slash(buffer *b) {
size_t len = buffer_string_length(b);
if (len > 0 && '/' != b->ptr[len-1]) BUFFER_APPEND_STRING_CONST(b, "/");