Merge branch 'port-gasyncresult.c-comments' into 'main'

gasyncresult: Port all doc comments to gi-docgen

See merge request GNOME/glib!4128
This commit is contained in:
Philip Withnall 2024-07-01 13:44:42 +00:00
commit 1b41818f50
2 changed files with 19 additions and 19 deletions

View File

@ -126,9 +126,9 @@ g_async_result_default_init (GAsyncResultInterface *iface)
/**
* g_async_result_get_user_data:
* @res: a #GAsyncResult.
* @res: a [iface@Gio.AsyncResult].
*
* Gets the user data from a #GAsyncResult.
* Gets the user data from a [iface@Gio.AsyncResult].
*
* Returns: (transfer full): the user data for @res.
**/
@ -146,12 +146,12 @@ g_async_result_get_user_data (GAsyncResult *res)
/**
* g_async_result_get_source_object:
* @res: a #GAsyncResult
* @res: a [iface@Gio.AsyncResult]
*
* Gets the source object from a #GAsyncResult.
* Gets the source object from a [iface@Gio.AsyncResult].
*
* Returns: (transfer full) (nullable): a new reference to the source
* object for the @res, or %NULL if there is none.
* object for the @res, or `NULL` if there is none.
*/
GObject *
g_async_result_get_source_object (GAsyncResult *res)
@ -167,22 +167,22 @@ g_async_result_get_source_object (GAsyncResult *res)
/**
* g_async_result_legacy_propagate_error:
* @res: a #GAsyncResult
* @res: a [iface@Gio.AsyncResult]
* @error: (out): a location to propagate the error to.
*
* If @res is a #GSimpleAsyncResult, this is equivalent to
* g_simple_async_result_propagate_error(). Otherwise it returns
* %FALSE.
* If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to
* [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns
* `FALSE`.
*
* This can be used for legacy error handling in async *_finish()
* wrapper functions that traditionally handled #GSimpleAsyncResult
* This can be used for legacy error handling in async `*_finish()`
* wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult]
* error returns themselves rather than calling into the virtual method.
* This should not be used in new code; #GAsyncResult errors that are
* This should not be used in new code; [iface@Gio.AsyncResult] errors that are
* set by virtual methods should also be extracted by virtual methods,
* to enable subclasses to chain up correctly.
*
* Returns: %TRUE if @error is has been filled in with an error from
* @res, %FALSE if not.
* Returns: `TRUE` if @error is has been filled in with an error from
* @res, `FALSE` if not.
*
* Since: 2.34
**/
@ -191,8 +191,8 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
GError **error)
{
/* This doesn't use a vmethod, because it's only for code that used
* to use GSimpleAsyncResult. (But it's a GAsyncResult method so
* that callers don't need to worry about GSimpleAsyncResult
* to use `GSimpleAsyncResult`. (But it's a `GAsyncResult` method so
* that callers don't need to worry about `GSimpleAsyncResult`
* deprecation warnings in the future.)
*/
@ -209,13 +209,13 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
/**
* g_async_result_is_tagged:
* @res: a #GAsyncResult
* @res: a [iface@Gio.AsyncResult]
* @source_tag: an application-defined tag
*
* Checks if @res has the given @source_tag (generally a function
* pointer indicating the function @res was created by).
*
* Returns: %TRUE if @res has the indicated @source_tag, %FALSE if
* Returns: `TRUE` if @res has the indicated @source_tag, `FALSE` if
* not.
*
* Since: 2.34

View File

@ -46,7 +46,7 @@ typedef struct _GAsyncResultIface GAsyncResultIface;
* @get_source_object: Gets the source object that issued the asynchronous operation.
* @is_tagged: Checks if a result is tagged with a particular source.
*
* Interface definition for #GAsyncResult.
* Interface definition for [iface@Gio.AsyncResult].
**/
struct _GAsyncResultIface
{