[glib/glib-2-32] Fix g_utf8_validate() out argument transfer mode



commit 8f46e27c35613e03109616a19c3928b28506cdd9
Author: Martin Pitt <martinpitt gnome org>
Date:   Mon Jun 18 07:39:23 2012 +0200

    Fix g_utf8_validate() out argument transfer mode
    
    The "end" argument is unusual in g_utf8_validate(): it's not a classic out
    argument which gets allocated by the called function, but merely points into
    one of its input arguments. Thus it is "transfer none".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672889

 glib/gutf8.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gutf8.c b/glib/gutf8.c
index bdc4752..e61d33d 100644
--- a/glib/gutf8.c
+++ b/glib/gutf8.c
@@ -1597,7 +1597,7 @@ fast_validate_len (const char *str,
  * g_utf8_validate:
  * @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
+ * @end: (allow-none) (out) (transfer none): return location for end of valid data
  * 
  * Validates UTF-8 encoded text. @str is the text to validate;
  * if @str is nul-terminated, then @max_len can be -1, otherwise



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