From 36d65922e22785f15cf31fa6273fc43dffab9fec Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 25 Sep 2023 14:38:28 -0400 Subject: [PATCH] docs: Move the GValueArray SECTION Move the contents to the struct docs. Helps: #3037 --- gobject/gvaluearray.c | 38 +++++++++++++++++++------------------- gobject/gvaluearray.h | 7 ------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c index 07b2ffb91..108ecc236 100644 --- a/gobject/gvaluearray.c +++ b/gobject/gvaluearray.c @@ -30,35 +30,35 @@ /** - * SECTION:value_arrays - * @short_description: A container structure to maintain an array of - * generic values - * @see_also: #GValue, #GParamSpecValueArray, g_param_spec_value_array() - * @title: Value arrays + * GValueArray: + * @n_values: number of values contained in the array + * @values: array of values * - * The prime purpose of a #GValueArray is for it to be used as an - * object property that holds an array of values. A #GValueArray wraps - * an array of #GValue elements in order for it to be used as a boxed - * type through %G_TYPE_VALUE_ARRAY. + * A `GValueArray` is a container structure to hold an array of generic values. * - * #GValueArray is deprecated in favour of #GArray since GLib 2.32. It - * is possible to create a #GArray that behaves like a #GValueArray by - * using the size of #GValue as the element size, and by setting - * g_value_unset() as the clear function using g_array_set_clear_func(), - * for instance, the following code: + * The prime purpose of a `GValueArray` is for it to be used as an + * object property that holds an array of values. A `GValueArray` wraps + * an array of `GValue` elements in order for it to be used as a boxed + * type through `G_TYPE_VALUE_ARRAY`. * - * |[ + * `GValueArray` is deprecated in favour of `GArray` since GLib 2.32. + * It is possible to create a `GArray` that behaves like a `GValueArray` + * by using the size of `GValue` as the element size, and by setting + * [func@GObject.value_unset] as the clear function using + * [method@GLib.Array.set_clear_func], for instance, the following code: + * + * ```c * GValueArray *array = g_value_array_new (10); - * ]| + * ``` * * can be replaced by: * - * |[ + * ```c * GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10); * g_array_set_clear_func (array, (GDestroyNotify) g_value_unset); - * ]| + * ``` * - * Deprecated: 2.32: Use #GArray instead, if possible for the given use case, + * Deprecated: 2.32: Use `GArray` instead, if possible for the given use case, * as described above. */ diff --git a/gobject/gvaluearray.h b/gobject/gvaluearray.h index 72aa91b57..d6052c0ae 100644 --- a/gobject/gvaluearray.h +++ b/gobject/gvaluearray.h @@ -41,13 +41,6 @@ G_BEGIN_DECLS /* --- typedefs & structs --- */ typedef struct _GValueArray GValueArray; -/** - * GValueArray: - * @n_values: number of values contained in the array - * @values: array of values - * - * A #GValueArray contains an array of #GValue elements. - */ struct _GValueArray { guint n_values;