Re: g_malloc overhead
- From: Tor Lillqvist <tml iki fi>
- To: Xavier Bestel <xavier bestel free fr>
- Cc: gtk-devel-list gnome org, gtk-app-devel-list gnome org, Maciej Piechotka <uzytkownik2 gmail com>
- Subject: Re: g_malloc overhead
- Date: Thu, 29 Jan 2009 16:51:50 +0200
> I think strncpy() is one of the few that needs an utf8 equivalent,
> because a char may span several bytes.
Well, he didn't say exactly what semantics he wanted his
g_utf8_strncpy() and g_utf16_strncpy() to have. In the UTF-8 case,
should the "size" mean characters or bytes? In the UTF-16 case,
characters or 16-bit units?
The existing g_utf8_strncpy() has it meaning characters. As such I
think the name is bit unfortunate, because of the similarity to
strncpy() but then different semantics of the "size" parameter.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]