Fix pointer-to-paramref syntax in docs

The documentation for GLib and Gio contains a number of documentation
comment blocks where a parameter reference (e.g. `@err`) is also
discussed in its dereferenced pointer form, which is generally
annotated as `*@err`. This inevitably confuses the MarkDown parser,
which sees the `*` as the beginning of an italicized text span.

To avoid this, replace all `*@foo` with <code>`*foo`</code>, which
loses the `@`-sigil linking it to the `@foo` parameter, but formats
correctly in the rendered documentation. (`@foo` is automatically
formatted like <code>`foo`</code>, so the resulting appearance in
the docs is as intended.)
This commit is contained in:
FeRD (Frank Dana) 2024-12-15 18:51:26 -05:00
parent ce991fc930
commit 9f016e5de4
5 changed files with 18 additions and 18 deletions

View File

@ -597,7 +597,7 @@ g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name,
* @format: (nullable): printf()-style format to prepend to @dbus_error_message or %NULL.
* @...: Arguments for @format.
*
* Does nothing if @error is %NULL. Otherwise sets *@error to
* Does nothing if @error is %NULL. Otherwise sets `*error` to
* a new #GError created with g_dbus_error_new_for_dbus_error()
* with @dbus_error_message prepend with @format (unless %NULL).
*

View File

@ -81,13 +81,13 @@ g_socket_address_enumerator_class_init (GSocketAddressEnumeratorClass *enumerato
* If @enumerator is expected to yield addresses, but for some reason
* is unable to (eg, because of a DNS error), then the first call to
* g_socket_address_enumerator_next() will return an appropriate error
* in *@error. However, if the first call to
* in `*error`. However, if the first call to
* g_socket_address_enumerator_next() succeeds, then any further
* internal errors (other than @cancellable being triggered) will be
* ignored.
*
* Returns: (transfer full) (nullable): a #GSocketAddress (owned by the caller), or %NULL on
* error (in which case *@error will be set) or if there are no
* error (in which case `*error` will be set) or if there are no
* more addresses.
*/
GSocketAddress *
@ -181,7 +181,7 @@ g_socket_address_enumerator_real_next_finish (GSocketAddressEnumerator *enumera
* error handling.
*
* Returns: (transfer full) (nullable): a #GSocketAddress (owned by the caller), or %NULL on
* error (in which case *@error will be set) or if there are no
* error (in which case `*error` will be set) or if there are no
* more addresses.
*/
GSocketAddress *

View File

@ -469,8 +469,8 @@ g_error_matches (const GError *error,
* @format: printf()-style format
* @...: args for @format
*
* Does nothing if @err is %NULL; if @err is non-%NULL, then *@err
* must be %NULL. A new #GError is created and assigned to *@err.
* Does nothing if @err is %NULL; if @err is non-%NULL, then `*err`
* must be %NULL. A new #GError is created and assigned to `*err`.
*/
void
g_set_error (GError **err,
@ -506,8 +506,8 @@ g_set_error (GError **err,
* @code: error code
* @message: error message
*
* Does nothing if @err is %NULL; if @err is non-%NULL, then *@err
* must be %NULL. A new #GError is created and assigned to *@err.
* Does nothing if @err is %NULL; if @err is non-%NULL, then `*err`
* must be %NULL. A new #GError is created and assigned to `*err`.
* Unlike g_set_error(), @message is not a printf()-style format string.
* Use this function if @message contains text you don't have control over,
* that could include printf() escape sequences.
@ -534,7 +534,7 @@ g_set_error_literal (GError **err,
* @dest: (out callee-allocates) (optional) (nullable): error return location
* @src: (transfer full): error to move into the return location
*
* If @dest is %NULL, free @src; otherwise, moves @src into *@dest.
* If @dest is %NULL, free @src; otherwise, moves @src into `*dest`.
* The error variable @dest points to must be %NULL.
*
* @src must be non-%NULL.
@ -570,8 +570,8 @@ g_propagate_error (GError **dest,
* g_clear_error:
* @err: a #GError return location
*
* If @err or *@err is %NULL, does nothing. Otherwise,
* calls g_error_free() on *@err and sets *@err to %NULL.
* If @err or `*err` is %NULL, does nothing. Otherwise,
* calls g_error_free() on `*err` and sets `*err` to %NULL.
*/
void
g_clear_error (GError **err)
@ -609,7 +609,7 @@ g_error_add_prefix (gchar **string,
* error message. If @err is %NULL (ie: no error variable) then do
* nothing.
*
* If *@err is %NULL (ie: an error variable is present but there is no
* If `*err` is %NULL (ie: an error variable is present but there is no
* error condition) then also do nothing.
*
* Since: 2.16
@ -634,7 +634,7 @@ g_prefix_error (GError **err,
* @err: (inout) (nullable) (optional): a return location for a #GError, or %NULL
* @prefix: string to prefix @err with
*
* Prefixes @prefix to an existing error message. If @err or *@err is
* Prefixes @prefix to an existing error message. If @err or `*err` is
* %NULL (i.e.: no error variable) then do nothing.
*
* Since: 2.70
@ -660,8 +660,8 @@ g_prefix_error_literal (GError **err,
* @format: printf()-style format string
* @...: arguments to @format
*
* If @dest is %NULL, free @src; otherwise, moves @src into *@dest.
* *@dest must be %NULL. After the move, add a prefix as with
* If @dest is %NULL, free @src; otherwise, moves @src into `*dest`.
* `*dest` must be %NULL. After the move, add a prefix as with
* g_prefix_error().
*
* Since: 2.16

View File

@ -748,7 +748,7 @@ gboolean
* g_once_init_leave:
* @location: (inout) (not optional): location of a static initializable variable
* containing 0
* @result: new non-0 value for *@value_location
* @result: new non-0 value for `*value_location`
*
* Counterpart to g_once_init_enter(). Expects a location of a static
* 0-initialized initialization variable, and an initialization value

View File

@ -605,10 +605,10 @@ decompose_hangul_step (gunichar ch,
* decompositions. It does, however, include algorithmic
* Hangul Jamo decomposition, as well as 'singleton'
* decompositions which replace a character by a single
* other character. In the case of singletons *@b will
* other character. In the case of singletons `*b` will
* be set to zero.
*
* If @ch is not decomposable, *@a is set to @ch and *@b
* If @ch is not decomposable, `*a` is set to @ch and `*b`
* is set to zero.
*
* Note that the way Unicode decomposition pairs are