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.
This commit is contained in:
Richard Hughes
2018-07-09 11:57:41 +01:00
parent 2585099a5d
commit dad58d7392
4 changed files with 76 additions and 0 deletions

View File

@@ -3497,6 +3497,7 @@ g_arc_box_get_size
<FILE>refstring</FILE>
g_ref_string_new
g_ref_string_new_intern
g_ref_string_new_len
g_ref_string_acquire
g_ref_string_release
g_ref_string_length