[glib] gdatainputstream: Document the returned string is always nul-terminated



commit 2ffba0e2620606f0a9113672682fea3ba877e6d2
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Feb 16 11:14:05 2018 +0000

    gdatainputstream: Document the returned string is always nul-terminated
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    Reviewed-by: nobody
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742124

 gio/gdatainputstream.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c
index 78a9b7d43..9f207b158 100644
--- a/gio/gdatainputstream.c
+++ b/gio/gdatainputstream.c
@@ -1316,6 +1316,8 @@ g_data_input_stream_read_until_finish (GDataInputStream  *stream,
  * Note that @stop_chars may contain '\0' if @stop_chars_len is
  * specified.
  *
+ * The returned string will always be nul-terminated on success.
+ *
  * Returns: (transfer full): a string with the data that was read
  *     before encountering any of the stop characters. Set @length to
  *     a #gsize to get the length of the string. This function will
@@ -1446,6 +1448,8 @@ g_data_input_stream_read_upto_async (GDataInputStream    *stream,
  * have to use g_data_input_stream_read_byte() to get it before calling
  * g_data_input_stream_read_upto_async() again.
  *
+ * The returned string will always be nul-terminated on success.
+ *
  * Returns: (transfer full): a string with the data that was read
  *     before encountering any of the stop characters. Set @length to
  *     a #gsize to get the length of the string. This function will


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