[glib/glib-2-48] Doc: Clarify when g_variant_get_fixed_array() should be used instead of _get_bytestring()



commit a4731c0830daca3e895b71bd81a5547781df5017
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Thu Mar 19 09:52:53 2015 -0400

    Doc: Clarify when g_variant_get_fixed_array() should be used instead of _get_bytestring()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746685

 glib/gvariant.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 209cfb6..f3b07b3 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -1839,6 +1839,9 @@ g_variant_new_bytestring (const gchar *string)
  * the last byte then the returned string is the string, up to the first
  * such nul character.
  *
+ * g_variant_get_fixed_array() should be used instead if the array contains
+ * arbitrary data that could not be nul-terminated or could contain nul bytes.
+ *
  * It is an error to call this function with a @value that is not an
  * array of bytes.
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]