[glib: 10/15] guri: Change type of g_uri_escape_bytes() to use guint8




commit e446c3487b6027203fbebcdfdd6dd8564bfbd5f7
Author: Philip Withnall <withnall endlessm com>
Date:   Thu Aug 6 14:04:38 2020 +0100

    guri: Change type of g_uri_escape_bytes() to use guint8
    
    `guint8` is the conventional way in modern GLib APIs to represent ‘a byte
    which could contain arbitrary binary’. `guchar` is not advised for that
    (even though it’s equivalent) because it could be misread as `gchar`.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/guri.c | 2 +-
 glib/guri.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/guri.c b/glib/guri.c
index 905130255..ec8658e68 100644
--- a/glib/guri.c
+++ b/glib/guri.c
@@ -2539,7 +2539,7 @@ g_uri_unescape_bytes (const gchar *escaped_string,
  * Since: 2.66
  */
 gchar *
-g_uri_escape_bytes (const guchar *unescaped,
+g_uri_escape_bytes (const guint8 *unescaped,
                     gsize         length,
                     const gchar  *reserved_chars_allowed)
 {
diff --git a/glib/guri.h b/glib/guri.h
index a85fd9e4b..c5c74704f 100644
--- a/glib/guri.h
+++ b/glib/guri.h
@@ -400,7 +400,7 @@ GBytes *    g_uri_unescape_bytes   (const char *escaped_string,
                                     GError    **error);
 
 GLIB_AVAILABLE_IN_2_66
-char *      g_uri_escape_bytes     (const guchar *unescaped,
+char *      g_uri_escape_bytes     (const guint8 *unescaped,
                                     gsize         length,
                                     const char   *reserved_chars_allowed);
 


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