]> git.ipfire.org Git - thirdparty/systemd.git/commit
utf8: let's update utf16_to_utf8() a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Jun 2018 17:16:43 +0000 (19:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Sep 2018 13:57:47 +0000 (15:57 +0200)
commit2ac2ff3fc1af850bf5159a652cf0005f634aebf9
tree1b14a9d596b16faf73c2977799a0ee4dd334e00e
parent7c4218578466e128a9cff42ff95d58deab16637e
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
src/basic/utf8.c
src/basic/utf8.h