Add a g_ref_string_new_len() to allow creating from non-NUL byte arraysdad58d7392756efe0219b88767845eecd53da94d158/head
commitdad58d7392756efe0219b88767845eecd53da94d
authorRichard Hughes <richard@hughsie.com>
Mon, 9 Jul 2018 10:57:41 +0000 (9 11:57 +0100)
committerRichard Hughes <richard@hughsie.com>
Mon, 9 Jul 2018 14:59:39 +0000 (9 15:59 +0100)
tree0ad9c45401b6cf1c698a57130d4e661cca8293a9
parent2585099a5db7c980496c866adb9ee73ad47a06e3
Add a g_ref_string_new_len() to allow creating from non-NUL byte arrays

A lot of GLib APIs provide a string length and explicitly say that the strings
are not NUL terminated. For instance, parsing XML using GMarkupParser or
reading packed binary strings from mmapped data files.
docs/reference/glib/glib-sections.txt
glib/grefstring.c
glib/grefstring.h
glib/tests/refstring.c