summaryrefslogtreecommitdiff
path: root/src/basic/utf8.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-25 19:16:43 +0200
committerLennart Poettering <lennart@poettering.net>2018-09-25 15:57:47 +0200
commit2ac2ff3fc1af850bf5159a652cf0005f634aebf9 (patch)
tree1b14a9d596b16faf73c2977799a0ee4dd334e00e /src/basic/utf8.h
parent7c4218578466e128a9cff42ff95d58deab16637e (diff)
downloadsystemd-2ac2ff3fc1af850bf5159a652cf0005f634aebf9.tar.gz
utf8: let's update utf16_to_utf8() a bit
Let's change utf16_to_utf8() prototype to refer to utf16 chars with char16_t rather than void Let's not cast away a "const" needlessly. Let's add a few comments. Let's fix the calculations of the buffer size to allocate, and how long to run the loop in case of uneven byte numbers
Diffstat (limited to 'src/basic/utf8.h')
-rw-r--r--src/basic/utf8.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/utf8.h b/src/basic/utf8.h
index 63991bf8c8..13c48b0978 100644
--- a/src/basic/utf8.h
+++ b/src/basic/utf8.h
@@ -25,7 +25,7 @@ char *utf8_escape_invalid(const char *s);
char *utf8_escape_non_printable(const char *str);
size_t utf8_encode_unichar(char *out_utf8, char32_t g);
-char *utf16_to_utf8(const void *s, size_t length);
+char *utf16_to_utf8(const char16_t *s, size_t length /* bytes! */);
int utf8_encoded_valid_unichar(const char *str);
int utf8_encoded_to_unichar(const char *str, char32_t *ret_unichar);