[glib] Add missing GVariant annotations



commit 85d12096e4fdef6451033cbecc03de2cd4066eb1
Author: Pavel Holejsovsky <pholejs src gnome org>
Date:   Fri Aug 5 16:31:06 2011 +0200

    Add missing GVariant annotations
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656031

 glib/gvariant-core.c |    2 +-
 glib/gvariant.c      |   12 ++++++++----
 glib/gvarianttype.c  |    4 ++--
 3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/glib/gvariant-core.c b/glib/gvariant-core.c
index e967701..aa31d48 100644
--- a/glib/gvariant-core.c
+++ b/glib/gvariant-core.c
@@ -801,7 +801,7 @@ g_variant_get_size (GVariant *value)
 /**
  * g_variant_get_data:
  * @value: a #GVariant instance
- * @returns: the serialised form of @value, or %NULL
+ * @returns: (transfer none): the serialised form of @value, or %NULL
  *
  * Returns a pointer to the serialised form of a #GVariant instance.
  * The returned data may not be in fully-normalised form if read from an
diff --git a/glib/gvariant.c b/glib/gvariant.c
index fe1cd9f..22faf08 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -1045,7 +1045,8 @@ g_variant_lookup_value (GVariant           *dictionary,
  * @value: a #GVariant array with fixed-sized elements
  * @n_elements: (out): a pointer to the location to store the number of items
  * @element_size: the size of each element
- * @returns: (array length=n_elements): a pointer to the fixed array
+ * @returns: (array length=n_elements) (transfer none): a pointer to
+ *           the fixed array
  *
  * Provides access to the serialised data for an array of fixed-sized
  * items.
@@ -1589,7 +1590,8 @@ g_variant_dup_objv (GVariant *value,
 
 /**
  * g_variant_new_bytestring:
- * @string: (array zero-terminated=1): a normal nul-terminated string in no particular encoding
+ * @string: (array zero-terminated=1) (element-type guint8): a normal
+ *          nul-terminated string in no particular encoding
  * @returns: (transfer none): a floating reference to a new bytestring #GVariant instance
  *
  * Creates an array-of-bytes #GVariant with the contents of @string.
@@ -1613,7 +1615,8 @@ g_variant_new_bytestring (const gchar *string)
 /**
  * g_variant_get_bytestring:
  * @value: an array-of-bytes #GVariant instance
- * @returns: (transfer none) (array zero-terminated=1): the constant string
+ * @returns: (transfer none) (array zero-terminated=1) (element-type guint8):
+ *           the constant string
  *
  * Returns the string value of a #GVariant instance with an
  * array-of-bytes type.  The string has no particular encoding.
@@ -1656,7 +1659,8 @@ g_variant_get_bytestring (GVariant *value)
  * @value: an array-of-bytes #GVariant instance
  * @length: (out) (allow-none) (default NULL): a pointer to a #gsize, to store
  *          the length (not including the nul terminator)
- * @returns: (transfer full) (array zero-terminated=1): a newly allocated string
+ * @returns: (transfer full) (array zero-terminated=1 length=length)
+ *           (element-type guint8): a newly allocated string
  *
  * Similar to g_variant_get_bytestring() except that instead of
  * returning a constant string, the string is duplicated.
diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c
index 3935747..2bdbcaa 100644
--- a/glib/gvarianttype.c
+++ b/glib/gvarianttype.c
@@ -502,8 +502,8 @@ g_variant_type_check (const GVariantType *type)
 /**
  * g_variant_type_string_scan:
  * @string: a pointer to any string
- * @limit: the end of @string, or %NULL
- * @endptr: location to store the end pointer, or %NULL
+ * @limit: (allow-none): the end of @string, or %NULL
+ * @endptr: (out) (allow-none): location to store the end pointer, or %NULL
  * @returns: %TRUE if a valid type string was found
  *
  * Scan for a single complete and valid GVariant type string in @string.



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