-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tor Lillqvist a écrit : > 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 I don't think it is so confusing since I think strncpy() expects ASCII characters, and ASCII characters are obviously 1-byte sized; this is even more true if you see there's a memcpy() function that is quite the same as what strncpy() is. Then considering both strncpy() and g_utf8_strncpy() takes the number of chars as the size argument fixes confusing if using it with what it was designed for (respectively ASCII and UTF-8). And when computing UTF-8 strings, I think it is obvious that if there's an utf8_* function, it does the same as the C's one does with ASCII string, no?
Regards, Colomban -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmB3EYACgkQyqbACDEjVWhhFwCeNHKu1/wDCnuGwoCuHGczzFnK 1msAnRi633VAMvjhagG8+S36/P0AG1hI =gg6h -----END PGP SIGNATURE----- _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list