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: * 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. * 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: * 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 * 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 * GObject *
g_async_result_get_source_object (GAsyncResult *res) 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: * g_async_result_legacy_propagate_error:
* @res: a #GAsyncResult * @res: a [iface@Gio.AsyncResult]
* @error: (out): a location to propagate the error to. * @error: (out): a location to propagate the error to.
* *
* If @res is a #GSimpleAsyncResult, this is equivalent to * If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to
* g_simple_async_result_propagate_error(). Otherwise it returns * [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns
* %FALSE. * `FALSE`.
* *
* This can be used for legacy error handling in async *_finish() * This can be used for legacy error handling in async `*_finish()`
* wrapper functions that traditionally handled #GSimpleAsyncResult * wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult]
* error returns themselves rather than calling into the virtual method. * 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, * set by virtual methods should also be extracted by virtual methods,
* to enable subclasses to chain up correctly. * to enable subclasses to chain up correctly.
* *
* Returns: %TRUE if @error is has been filled in with an error from * Returns: `TRUE` if @error is has been filled in with an error from
* @res, %FALSE if not. * @res, `FALSE` if not.
* *
* Since: 2.34 * Since: 2.34
**/ **/
@ -191,8 +191,8 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
GError **error) GError **error)
{ {
/* This doesn't use a vmethod, because it's only for code that used /* This doesn't use a vmethod, because it's only for code that used
* to use GSimpleAsyncResult. (But it's a GAsyncResult method so * to use `GSimpleAsyncResult`. (But it's a `GAsyncResult` method so
* that callers don't need to worry about GSimpleAsyncResult * that callers don't need to worry about `GSimpleAsyncResult`
* deprecation warnings in the future.) * deprecation warnings in the future.)
*/ */
@ -209,13 +209,13 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
/** /**
* g_async_result_is_tagged: * g_async_result_is_tagged:
* @res: a #GAsyncResult * @res: a [iface@Gio.AsyncResult]
* @source_tag: an application-defined tag * @source_tag: an application-defined tag
* *
* Checks if @res has the given @source_tag (generally a function * Checks if @res has the given @source_tag (generally a function
* pointer indicating the function @res was created by). * 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. * not.
* *
* Since: 2.34 * 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. * @get_source_object: Gets the source object that issued the asynchronous operation.
* @is_tagged: Checks if a result is tagged with a particular source. * @is_tagged: Checks if a result is tagged with a particular source.
* *
* Interface definition for #GAsyncResult. * Interface definition for [iface@Gio.AsyncResult].
**/ **/
struct _GAsyncResultIface struct _GAsyncResultIface
{ {