[libgit2-glib] ggit-submodule.c: Fix return annotations



commit 206b516b20223001c89772ed32293126fcd7c44e
Author: Brian C. Lane <bcl redhat com>
Date:   Wed Aug 30 17:50:23 2017 -0700

    ggit-submodule.c: Fix return annotations
    
    Add (nullable) as needed.

 libgit2-glib/ggit-submodule.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/libgit2-glib/ggit-submodule.c b/libgit2-glib/ggit-submodule.c
index 8e49768..cae1350 100644
--- a/libgit2-glib/ggit-submodule.c
+++ b/libgit2-glib/ggit-submodule.c
@@ -62,7 +62,7 @@ _ggit_submodule_invalidate (GgitSubmodule *submodule)
  * Atomically increments the reference count of @submodule by one.
  * This function is MT-safe and may be called from any thread.
  *
- * Returns: (transfer none): the passed in #GgitSubmodule.
+ * Returns: (transfer none) (nullable): the passed in #GgitSubmodule or %NULL.
  */
 GgitSubmodule *
 ggit_submodule_ref (GgitSubmodule *submodule)
@@ -102,7 +102,7 @@ ggit_submodule_unref (GgitSubmodule *submodule)
  * will return distinct #GgitRepository objects. Only submodules which are
  * checked out in the working directory can be opened.
  *
- * Returns: (transfer full): the opened #GgitRepository or %NULL in case of an
+ * Returns: (transfer full) (nullable): the opened #GgitRepository or %NULL in case of an
  *                           error.
  */
 GgitRepository *
@@ -133,7 +133,7 @@ ggit_submodule_open (GgitSubmodule  *submodule,
  *
  * Gets the containing repository for a submodule.
  *
- * Returns: (transfer full): the containing repository for a submodule.
+ * Returns: (transfer full) (nullable): the containing repository for a submodule or %NULL.
  */
 GgitRepository *
 ggit_submodule_get_owner (GgitSubmodule *submodule)
@@ -151,7 +151,7 @@ ggit_submodule_get_owner (GgitSubmodule *submodule)
  *
  * Gets the name of the submodule from .gitmodules.
  *
- * Returns: the name of the submodule from .gitmodules.
+ * Returns: (transfer none) (nullable): the name of the submodule from .gitmodules or %NULL.
  */
 const gchar *
 ggit_submodule_get_name (GgitSubmodule *submodule)
@@ -170,7 +170,8 @@ ggit_submodule_get_name (GgitSubmodule *submodule)
  * It is almost always the same as the name.
  * See ggit_submodule_get_name().
  *
- * Returns: the path to the submodule from the repo working directory.
+ * Returns: (transfer none) (nullable): the path to the submodule from
+ * the repo working directory or %NULL.
  */
 const gchar *
 ggit_submodule_get_path (GgitSubmodule *submodule)
@@ -188,7 +189,7 @@ ggit_submodule_get_path (GgitSubmodule *submodule)
  * Gets the url for the submodule or %NULL if the submodule has been deleted
  * but not yet committed.
  *
- * Returns: the url for the submodule.
+ * Returns: (transfer none) (nullable): the url for the submodule or %NULL.
  */
 const gchar *
 ggit_submodule_get_url (GgitSubmodule *submodule)
@@ -205,7 +206,7 @@ ggit_submodule_get_url (GgitSubmodule *submodule)
  *
  * Gets the OID for the submodule in the index or %NULL if there is no index.
  *
- * Returns: (transfer full) (allow-none): the OID for the submodule in the index or %NULL.
+ * Returns: (transfer full) (nullable): the OID for the submodule in the index or %NULL.
  */
 GgitOId *
 ggit_submodule_get_index_id (GgitSubmodule *submodule)
@@ -229,7 +230,7 @@ ggit_submodule_get_index_id (GgitSubmodule *submodule)
  *
  * Gets the OID for the submodule in the current HEAD tree.
  *
- * Returns: (transfer full) (allow-none): the OID for the submodule in the current HEAD tree or %NULL.
+ * Returns: (transfer full) (nullable): the OID for the submodule in the current HEAD tree or %NULL.
  */
 GgitOId *
 ggit_submodule_get_head_id (GgitSubmodule *submodule)
@@ -257,7 +258,7 @@ ggit_submodule_get_head_id (GgitSubmodule *submodule)
  * else, this won't notice that.  You should call ggit_submodule_status()
  * for a more complete picture about the state of the working directory.
  *
- * Returns: (transfer full) (allow-none): the OID for the submodule in the current working directory or 
%NULL.
+ * Returns: (transfer full) (nullable): the OID for the submodule in the current working directory or %NULL.
  */
 GgitOId *
 ggit_submodule_get_workdir_id (GgitSubmodule *submodule)


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