[glib/glib-2-32] g_utf8_validate: @str shouldn't end up annotated as utf8



commit 3d35cbfae9ea1a923f88581ec9a6c7304ddefbc1
Author: Dan Winship <danw gnome org>
Date:   Wed Mar 21 09:22:38 2012 -0400

    g_utf8_validate: @str shouldn't end up annotated as utf8
    
    In order for this function to have any point, it has to be possible to
    pass non-UTF-8 data to it, so annotate @str as being array-of-guint8
    instead of utf8.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672548

 glib/gutf8.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gutf8.c b/glib/gutf8.c
index 19be759..bdc4752 100644
--- a/glib/gutf8.c
+++ b/glib/gutf8.c
@@ -1595,7 +1595,7 @@ fast_validate_len (const char *str,
 
 /**
  * g_utf8_validate:
- * @str: a pointer to character data
+ * @str: (array length=max_len) (element-type guint8): a pointer to character data
  * @max_len: max bytes to validate, or -1 to go until NUL
  * @end: (allow-none) (out): return location for end of valid data
  * 



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