summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-11-23 19:20:44 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-11-25 19:52:08 -0500
commitcf93e91c56e2ac1c79ea82d88e6d3243db56da91 (patch)
treef6959f879d5e33745911aecf419de1ca671ba81a /src/buffer.h
parentd7cfc8a38117ef2368740fedaed3d38c43bf414b (diff)
downloadlighttpd-git-cf93e91c56e2ac1c79ea82d88e6d3243db56da91.tar.gz
[core] perf: inline buffer_copy_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 da364a68..189d526c 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -74,7 +74,7 @@ static inline void buffer_clear(buffer *b);
void buffer_copy_string(buffer *b, const char *s);
void buffer_copy_string_len(buffer *b, const char *s, size_t s_len);
-void buffer_copy_buffer(buffer *b, const buffer *src);
+static inline 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);
@@ -204,6 +204,10 @@ static inline size_t buffer_string_space(const buffer *b) {
return NULL != b && b->size ? b->size - (b->used | (0 == b->used)) : 0;
}
+static inline void buffer_copy_buffer(buffer *b, const buffer *src) {
+ buffer_copy_string_len(b, CONST_BUF_LEN(src));
+}
+
static inline void buffer_append_string_buffer(buffer *b, const buffer *src) {
buffer_append_string_len(b, CONST_BUF_LEN(src));
}