[glib/ebassi/for-main] doc: Correctly annotate GAsyncQueue methods
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/ebassi/for-main] doc: Correctly annotate GAsyncQueue methods
- Date: Thu, 13 Oct 2022 22:56:35 +0000 (UTC)
commit 80f56c9eb45add863ca8e55e17389c926b96fd02
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Oct 13 23:44:11 2022 +0100
doc: Correctly annotate GAsyncQueue methods
Generic pointers are assumed to be nullable unless explicitly marked as
not nullable.
glib/gasyncqueue.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c
index c824751afc..0518763a65 100644
--- a/glib/gasyncqueue.c
+++ b/glib/gasyncqueue.c
@@ -281,9 +281,11 @@ g_async_queue_unlock (GAsyncQueue *queue)
/**
* g_async_queue_push:
* @queue: a #GAsyncQueue
- * @data: @data to push into the @queue
+ * @data: (not nullable): data to push onto the @queue
*
- * Pushes the @data into the @queue. @data must not be %NULL.
+ * Pushes the @data into the @queue.
+ *
+ * The @data parameter must not be %NULL.
*/
void
g_async_queue_push (GAsyncQueue *queue,
@@ -300,9 +302,11 @@ g_async_queue_push (GAsyncQueue *queue,
/**
* g_async_queue_push_unlocked:
* @queue: a #GAsyncQueue
- * @data: @data to push into the @queue
+ * @data: (not nullable): data to push onto the @queue
+ *
+ * Pushes the @data into the @queue.
*
- * Pushes the @data into the @queue. @data must not be %NULL.
+ * The @data parameter must not be %NULL.
*
* This function must be called while holding the @queue's lock.
*/
@@ -321,7 +325,7 @@ g_async_queue_push_unlocked (GAsyncQueue *queue,
/**
* g_async_queue_push_sorted:
* @queue: a #GAsyncQueue
- * @data: the @data to push into the @queue
+ * @data: (not nullable): the @data to push into the @queue
* @func: the #GCompareDataFunc is used to sort @queue
* @user_data: user data passed to @func.
*
@@ -362,7 +366,7 @@ g_async_queue_invert_compare (gpointer v1,
/**
* g_async_queue_push_sorted_unlocked:
* @queue: a #GAsyncQueue
- * @data: the @data to push into the @queue
+ * @data: the data to push into the @queue
* @func: the #GCompareDataFunc is used to sort @queue
* @user_data: user data passed to @func.
*
@@ -485,7 +489,7 @@ g_async_queue_pop_unlocked (GAsyncQueue *queue)
* %NULL is returned.
*
* Returns: (nullable): data from the queue or %NULL, when no data is
- * available immediately.
+ * available immediately.
*/
gpointer
g_async_queue_try_pop (GAsyncQueue *queue)
@@ -511,7 +515,7 @@ g_async_queue_try_pop (GAsyncQueue *queue)
* This function must be called while holding the @queue's lock.
*
* Returns: (nullable): data from the queue or %NULL, when no data is
- * available immediately.
+ * available immediately.
*/
gpointer
g_async_queue_try_pop_unlocked (GAsyncQueue *queue)
@@ -532,7 +536,7 @@ g_async_queue_try_pop_unlocked (GAsyncQueue *queue)
* If no data is received before the timeout, %NULL is returned.
*
* Returns: (nullable): data from the queue or %NULL, when no data is
- * received before the timeout.
+ * received before the timeout.
*/
gpointer
g_async_queue_timeout_pop (GAsyncQueue *queue,
@@ -563,7 +567,7 @@ g_async_queue_timeout_pop (GAsyncQueue *queue,
* This function must be called while holding the @queue's lock.
*
* Returns: (nullable): data from the queue or %NULL, when no data is
- * received before the timeout.
+ * received before the timeout.
*/
gpointer
g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue,
@@ -590,7 +594,7 @@ g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue,
* and g_time_val_add() can be used.
*
* Returns: (nullable): data from the queue or %NULL, when no data is
- * received before @end_time.
+ * received before @end_time.
*
* Deprecated: use g_async_queue_timeout_pop().
*/
@@ -636,7 +640,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* This function must be called while holding the @queue's lock.
*
* Returns: (nullable): data from the queue or %NULL, when no data is
- * received before @end_time.
+ * received before @end_time.
*
* Deprecated: use g_async_queue_timeout_pop_unlocked().
*/
@@ -798,7 +802,7 @@ g_async_queue_sort_unlocked (GAsyncQueue *queue,
/**
* g_async_queue_remove:
* @queue: a #GAsyncQueue
- * @item: the data to remove from the @queue
+ * @item: (not nullable): the data to remove from the @queue
*
* Remove an item from the queue.
*
@@ -848,7 +852,7 @@ g_async_queue_remove_unlocked (GAsyncQueue *queue,
/**
* g_async_queue_push_front:
* @queue: a #GAsyncQueue
- * @item: data to push into the @queue
+ * @item: (not nullable): data to push into the @queue
*
* Pushes the @item into the @queue. @item must not be %NULL.
* In contrast to g_async_queue_push(), this function
@@ -872,7 +876,7 @@ g_async_queue_push_front (GAsyncQueue *queue,
/**
* g_async_queue_push_front_unlocked:
* @queue: a #GAsyncQueue
- * @item: data to push into the @queue
+ * @item: (not nullable): data to push into the @queue
*
* Pushes the @item into the @queue. @item must not be %NULL.
* In contrast to g_async_queue_push_unlocked(), this function
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]