[gimp] libgimpbase: more (transfer) and (element-type) warnings fixed.



commit ab6783902e6745b9f7cc437cf3b713354ea8a2d4
Author: Jehan <jehan girinstud io>
Date:   Sun Jul 28 10:09:46 2019 +0200

    libgimpbase: more (transfer) and (element-type) warnings fixed.

 libgimpbase/gimpenv.c      | 37 ++++++++++++++++++++++++-------------
 libgimpbase/gimpmemsize.c  |  2 +-
 libgimpbase/gimpmetadata.c |  9 +++++----
 libgimpbase/gimpunit.c     |  2 +-
 4 files changed, 31 insertions(+), 19 deletions(-)
---
diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c
index ef816771a1..85255a807a 100644
--- a/libgimpbase/gimpenv.c
+++ b/libgimpbase/gimpenv.c
@@ -743,7 +743,8 @@ gimp_child_file (const gchar *parent,
  *
  * Since: 2.10
  *
- * Returns: a new @GFile for the path, Free with g_object_unref().
+ * Returns: (transfer full):
+ *          a new @GFile for the path, Free with g_object_unref().
  **/
 GFile *
 gimp_directory_file (const gchar *first_element,
@@ -773,7 +774,8 @@ gimp_directory_file (const gchar *first_element,
  *
  * Since: 2.10.10
  *
- * Returns: a new @GFile for the path, Free with g_object_unref().
+ * Returns: (transfer full):
+ *          a new @GFile for the path, Free with g_object_unref().
  **/
 GFile *
 gimp_installation_directory_file (const gchar *first_element,
@@ -803,7 +805,8 @@ gimp_installation_directory_file (const gchar *first_element,
  *
  * Since: 2.10
  *
- * Returns: a new @GFile for the path, Free with g_object_unref().
+ * Returns: (transfer full):
+ *          a new @GFile for the path, Free with g_object_unref().
  **/
 GFile *
 gimp_data_directory_file (const gchar *first_element,
@@ -833,7 +836,8 @@ gimp_data_directory_file (const gchar *first_element,
  *
  * Since: 2.10
  *
- * Returns: a new @GFile for the path, Free with g_object_unref().
+ * Returns: (transfer full):
+ *          a new @GFile for the path, Free with g_object_unref().
  **/
 GFile *
 gimp_locale_directory_file (const gchar *first_element,
@@ -863,7 +867,8 @@ gimp_locale_directory_file (const gchar *first_element,
  *
  * Since: 2.10
  *
- * Returns: a new @GFile for the path, Free with g_object_unref().
+ * Returns: (transfer full):
+ *          a new @GFile for the path, Free with g_object_unref().
  **/
 GFile *
 gimp_sysconf_directory_file (const gchar *first_element,
@@ -893,7 +898,8 @@ gimp_sysconf_directory_file (const gchar *first_element,
  *
  * Since: 2.10
  *
- * Returns: a new @GFile for the path, Free with g_object_unref().
+ * Returns: (transfer full):
+ *          a new @GFile for the path, Free with g_object_unref().
  **/
 GFile *
 gimp_plug_in_directory_file (const gchar *first_element,
@@ -1028,10 +1034,11 @@ gimp_path_runtime_fix (gchar **path)
  * @path:         A list of directories separated by #G_SEARCHPATH_SEPARATOR.
  * @max_paths:    The maximum number of directories to return.
  * @check:        %TRUE if you want the directories to be checked.
- * @check_failed: Returns a #GList of path elements for which the
- *                check failed.
+ * @check_failed: (element-type filename) (out callee-allocates):
+                  Returns a #GList of path elements for which the check failed.
  *
- * Returns: A #GList of all directories in @path.
+ * Returns: (element-type filename) (transfer full):
+            A #GList of all directories in @path.
  **/
 GList *
 gimp_path_parse (const gchar  *path,
@@ -1111,9 +1118,11 @@ gimp_path_parse (const gchar  *path,
 
 /**
  * gimp_path_to_str:
- * @path: A list of directories as returned by gimp_path_parse().
+ * @path: (element-type filename):
+ *        A list of directories as returned by gimp_path_parse().
  *
- * Returns: A searchpath string separated by #G_SEARCHPATH_SEPARATOR.
+ * Returns: (type filename) (transfer full):
+ *          A searchpath string separated by #G_SEARCHPATH_SEPARATOR.
  **/
 gchar *
 gimp_path_to_str (GList *path)
@@ -1145,7 +1154,8 @@ gimp_path_to_str (GList *path)
 
 /**
  * gimp_path_free:
- * @path: A list of directories as returned by gimp_path_parse().
+ * @path: (element-type filename):
+ *        A list of directories as returned by gimp_path_parse().
  *
  * This function frees the memory allocated for the list and the strings
  * it contains.
@@ -1158,7 +1168,8 @@ gimp_path_free (GList *path)
 
 /**
  * gimp_path_get_user_writable_dir:
- * @path: A list of directories as returned by gimp_path_parse().
+ * @path: (element-type filename):
+ *        A list of directories as returned by gimp_path_parse().
  *
  * Note that you have to g_free() the returned string.
  *
diff --git a/libgimpbase/gimpmemsize.c b/libgimpbase/gimpmemsize.c
index ab88354013..8d91c140f1 100644
--- a/libgimpbase/gimpmemsize.c
+++ b/libgimpbase/gimpmemsize.c
@@ -246,7 +246,7 @@ gimp_param_memsize_class_init (GParamSpecClass *class)
  * Creates a param spec to hold a memory size value.
  * See g_param_spec_internal() for more information.
  *
- * Returns: a newly allocated #GParamSpec instance
+ * Returns: (transfer full): a newly allocated #GParamSpec instance
  *
  * Since: 2.4
  **/
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index 9bf18f83cc..c81dbedbe7 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -473,7 +473,7 @@ gimp_metadata_add_xmp_history (GimpMetadata *metadata,
  *
  * Creates a new #GimpMetadata instance.
  *
- * Return value: The new #GimpMetadata.
+ * Return value: (transfer full): The new #GimpMetadata.
  *
  * Since: 2.10
  */
@@ -505,7 +505,8 @@ gimp_metadata_new (void)
  *
  * Duplicates a #GimpMetadata instance.
  *
- * Return value: The new #GimpMetadata, or %NULL if @metadata is %NULL.
+ * Return value: (transfer full):
+ *               The new #GimpMetadata, or %NULL if @metadata is %NULL.
  *
  * Since: 2.10
  */
@@ -680,7 +681,7 @@ gimp_metadata_deserialize_error (GMarkupParseContext *context,
  * Deserializes a string of XML that has been created by
  * gimp_metadata_serialize().
  *
- * Return value: The new #GimpMetadata.
+ * Return value: (transfer full): The new #GimpMetadata.
  *
  * Since: 2.10
  */
@@ -855,7 +856,7 @@ gimp_metadata_serialize (GimpMetadata *metadata)
  *
  * Loads #GimpMetadata from @file.
  *
- * Return value: The loaded #GimpMetadata.
+ * Return value: (transfer full): The loaded #GimpMetadata.
  *
  * Since: 2.10
  */
diff --git a/libgimpbase/gimpunit.c b/libgimpbase/gimpunit.c
index e0aa626e1e..44f248f673 100644
--- a/libgimpbase/gimpunit.c
+++ b/libgimpbase/gimpunit.c
@@ -618,7 +618,7 @@ gimp_param_unit_value_validate (GParamSpec *pspec,
  * Creates a param spec to hold a units param.
  * See g_param_spec_internal() for more information.
  *
- * Returns: a newly allocated #GParamSpec instance
+ * Returns: (transfer full): a newly allocated #GParamSpec instance
  *
  * Since: 2.4
  **/


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