[gtk: 1/2] Add some missing nullable return annotations




commit cd0bef93907880550bc14dcbe9cca13ebeafce0d
Author: Sophie Herold <sophie hemio de>
Date:   Sat Oct 17 15:17:56 2020 +0200

    Add some missing nullable return annotations

 gdk/gdkclipboard.c               | 2 +-
 gdk/gdkcontentformats.c          | 2 +-
 gdk/gdkdisplay.c                 | 2 +-
 gdk/wayland/gdkdisplay-wayland.c | 2 +-
 gsk/gsktransform.c               | 2 +-
 gtk/gtkbuilderparser.c           | 2 +-
 gtk/gtkentrycompletion.c         | 2 +-
 gtk/gtkexpression.c              | 2 +-
 gtk/gtkstyleproperty.c           | 2 +-
 gtk/gtktreemodel.c               | 8 ++++----
 10 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gdk/gdkclipboard.c b/gdk/gdkclipboard.c
index b408a68e23..8ed2acef6b 100644
--- a/gdk/gdkclipboard.c
+++ b/gdk/gdkclipboard.c
@@ -681,7 +681,7 @@ gdk_clipboard_read_async (GdkClipboard        *clipboard,
  *
  * Finishes an asynchronous clipboard read started with gdk_clipboard_read_async().
  *
- * Returns: (transfer full): a #GInputStream or %NULL on error.
+ * Returns: (transfer full) (nullable): a #GInputStream or %NULL on error.
  **/
 GInputStream *
 gdk_clipboard_read_finish (GdkClipboard  *clipboard,
diff --git a/gdk/gdkcontentformats.c b/gdk/gdkcontentformats.c
index e677e68808..005d387b7c 100644
--- a/gdk/gdkcontentformats.c
+++ b/gdk/gdkcontentformats.c
@@ -385,7 +385,7 @@ gdk_content_formats_match_gtype (const GdkContentFormats *first,
  * in @second. If no matching mime type is found, %NULL is
  * returned.
  *
- * Returns: The first common mime type or %NULL if none.
+ * Returns: (nullable): The first common mime type or %NULL if none.
  **/
 const char *
 gdk_content_formats_match_mime_type (const GdkContentFormats *first,
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 8fccd2a521..9942ec6063 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1107,7 +1107,7 @@ gdk_display_notify_startup_complete (GdkDisplay  *display,
  * Gets the startup notification ID for a Wayland display, or %NULL
  * if no ID has been defined.
  *
- * Returns: the startup notification ID for @display, or %NULL
+ * Returns: (nullable): the startup notification ID for @display, or %NULL
  */
 const char *
 gdk_display_get_startup_notification_id (GdkDisplay *display)
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index c37ce3d4d0..1c49b13371 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -873,7 +873,7 @@ gdk_wayland_display_get_next_serial (GdkDisplay *display)
  * Gets the startup notification ID for a Wayland display, or %NULL
  * if no ID has been defined.
  *
- * Returns: the startup notification ID for @display, or %NULL
+ * Returns: (nullable): the startup notification ID for @display, or %NULL
  */
 const char *
 gdk_wayland_display_get_startup_notification_id (GdkDisplay  *display)
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index 7f9cc20e5b..adc64ccc30 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -1684,7 +1684,7 @@ gsk_transform_transform (GskTransform *next,
  * between those cases, you should check @self is not %NULL
  * before calling this function.
  *
- * Returns: The inverted transform or %NULL if the transform
+ * Returns: (nullable): The inverted transform or %NULL if the transform
  *     cannot be inverted.
  **/
 GskTransform *
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c
index 3ea04b941f..66ff6981a7 100644
--- a/gtk/gtkbuilderparser.c
+++ b/gtk/gtkbuilderparser.c
@@ -296,7 +296,7 @@ gtk_buildable_parse_context_pop (GtkBuildableParseContext *context)
  * give the element_name as passed to those functions. For the parent
  * elements, see gtk_buildable_parse_context_get_element_stack().
  *
- * Returns: the name of the currently open element, or %NULL
+ * Returns: (nullable): the name of the currently open element, or %NULL
  */
 const char *
 gtk_buildable_parse_context_get_element (GtkBuildableParseContext *context)
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 8f3ee30eda..6c197a4572 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1329,7 +1329,7 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion,
  * Get the original text entered by the user that triggered
  * the completion or %NULL if there’s no completion ongoing.
  *
- * Returns: the prefix for the current completion
+ * Returns: (nullable): the prefix for the current completion
  */
 const char *
 gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion)
diff --git a/gtk/gtkexpression.c b/gtk/gtkexpression.c
index 009c2da8c7..f7c25f9c73 100644
--- a/gtk/gtkexpression.c
+++ b/gtk/gtkexpression.c
@@ -1026,7 +1026,7 @@ gtk_object_expression_new (GObject *object)
  *
  * Gets the object that the expression evaluates to.
  *
- * Returns: (transfer none): the object, or %NULL
+ * Returns: (transfer none) (nullable): the object, or %NULL
  */
 GObject *
 gtk_object_expression_get_object (GtkExpression *expression)
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index e6fee266f0..964ac388ed 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -128,7 +128,7 @@ _gtk_style_property_init (GtkStyleProperty *property)
  * always be a #GtkCssValue whose values can be queried with
  * _gtk_css_array_value_get_nth().
  *
- * Returns: %NULL on failure or the parsed #GtkCssValue
+ * Returns: (nullable): %NULL on failure or the parsed #GtkCssValue
  **/
 GtkCssValue *
 _gtk_style_property_parse_value (GtkStyleProperty *property,
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c
index b56bff2ef5..377a365d7b 100644
--- a/gtk/gtktreemodel.c
+++ b/gtk/gtktreemodel.c
@@ -623,7 +623,7 @@ gtk_tree_path_new (void)
  * child of that 11th child, and the 1st child of that 5th child.
  * If an invalid path string is passed in, %NULL is returned.
  *
- * Returns: A newly-created #GtkTreePath-struct, or %NULL
+ * Returns: (nullable): A newly-created #GtkTreePath-struct, or %NULL
  */
 GtkTreePath *
 gtk_tree_path_new_from_string (const char *path)
@@ -866,7 +866,7 @@ gtk_tree_path_get_depth (GtkTreePath *path)
  *
  * The length of the array can be obtained with gtk_tree_path_get_depth().
  *
- * Returns: The current indices, or %NULL
+ * Returns: (nullable): The current indices, or %NULL
  */
 int *
 gtk_tree_path_get_indices (GtkTreePath *path)
@@ -2286,7 +2286,7 @@ gtk_tree_row_reference_unref_path (GtkTreePath  *path,
  * propagated, and the path is updated appropriately. If
  * @path isn’t a valid path in @model, then %NULL is returned.
  *
- * Returns: a newly allocated #GtkTreeRowReference, or %NULL
+ * Returns: (nullable): a newly allocated #GtkTreeRowReference, or %NULL
  */
 GtkTreeRowReference *
 gtk_tree_row_reference_new (GtkTreeModel *model,
@@ -2333,7 +2333,7 @@ gtk_tree_row_reference_new (GtkTreeModel *model,
  * need to carefully monitor exactly when a row reference updates
  * itself, and is not generally needed by most applications.
  *
- * Returns: a newly allocated #GtkTreeRowReference, or %NULL
+ * Returns: (nullable): a newly allocated #GtkTreeRowReference, or %NULL
  */
 GtkTreeRowReference *
 gtk_tree_row_reference_new_proxy (GObject      *proxy,


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