dovecot-2.2: liblib: Added str_append_data(), which is simply a ...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 5 12:31:39 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/841d31e6c647
changeset: 17318:841d31e6c647
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 05 15:05:20 2014 +0300
description:
liblib: Added str_append_data(), which is simply a wrapper to buffer_append()
This is intended for appending data that may contain NUL characters that are
wanted to be added to the string.

diffstat:

 src/lib/str.c |  5 +++++
 src/lib/str.h |  1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r ef701c458b25 -r 841d31e6c647 src/lib/str.c
--- a/src/lib/str.c	Mon May 05 15:09:27 2014 +0300
+++ b/src/lib/str.c	Mon May 05 15:05:20 2014 +0300
@@ -107,6 +107,11 @@
 	buffer_append(str, cstr, len);
 }
 
+void str_append_data(string_t *str, const void *data, size_t len)
+{
+	buffer_append(str, data, len);
+}
+
 void str_append_c(string_t *str, unsigned char chr)
 {
 	buffer_append_c(str, chr);
diff -r ef701c458b25 -r 841d31e6c647 src/lib/str.h
--- a/src/lib/str.h	Mon May 05 15:09:27 2014 +0300
+++ b/src/lib/str.h	Mon May 05 15:05:20 2014 +0300
@@ -20,6 +20,7 @@
 /* Append string/character */
 void str_append(string_t *str, const char *cstr);
 void str_append_n(string_t *str, const void *cstr, size_t max_len);
+void str_append_data(string_t *str, const void *data, size_t len);
 void str_append_c(string_t *str, unsigned char chr);
 void str_append_str(string_t *dest, const string_t *src);
 


More information about the dovecot-cvs mailing list