From a65fe37e5c7f2d21736284c014b439402e6dee74 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 14 Nov 2020 20:35:09 +0000 Subject: [PATCH] gobject: Clarify documentation and annotations of g_set_object() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Heavily based on changes suggested by Дилян Палаузов. Signed-off-by: Philip Withnall Fixes: #1849 --- gobject/gobject.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gobject/gobject.h b/gobject/gobject.h index bf5496c54..7f55e1976 100644 --- a/gobject/gobject.h +++ b/gobject/gobject.h @@ -679,16 +679,16 @@ void g_clear_object (GObject **object_ptr); /** * g_set_object: (skip) - * @object_ptr: a pointer to a #GObject reference + * @object_ptr: (inout) (not optional) (nullable): a pointer to a #GObject reference * @new_object: (nullable) (transfer none): a pointer to the new #GObject to - * assign to it, or %NULL to clear the pointer + * assign to @object_ptr, or %NULL to clear the pointer * * Updates a #GObject pointer to refer to @new_object. It increments the * reference count of @new_object (if non-%NULL), decrements the reference * count of the current value of @object_ptr (if non-%NULL), and assigns * @new_object to @object_ptr. The assignment is not atomic. * - * @object_ptr must not be %NULL. + * @object_ptr must not be %NULL, but can point to a %NULL value. * * A macro is also included that allows this function to be used without * pointer casts. The function itself is static inline, so its address may vary