Deprecate GValueArray

The GValueArray type was added in a time, during the Jurassic era or so,
when GArray did not have a representable GType. The GValueArray API has
various issues as well:

  - it doesn't match the other GLib array types;
  - it is not reference counted;
  - the structure is fully exposed on the stack, so it cannot be
    extended to add reference counting;
  - it cannot be forcibly resized.

The nice thing is that now we have a GArray type that can replace in
full GValueArray, so we can deprecate the latter, and reduce the
complexity in GLib, application code, and bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=667228
This commit is contained in:
Emmanuele Bassi
2012-01-04 09:31:12 +00:00
committed by Matthias Clasen
parent c602a5f887
commit 0ac9ab4e27
7 changed files with 74 additions and 2 deletions

View File

@@ -111,11 +111,15 @@ GType g_boxed_type_register_static (const gchar *name,
*
* The type ID of the "GValueArray" type which is a boxed type,
* used to pass around pointers to GValueArrays.
*
* Deprecated: 2.32: Use #GArray instead of #GValueArray
*/
#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
GType g_closure_get_type (void) G_GNUC_CONST;
GType g_value_get_type (void) G_GNUC_CONST;
GLIB_DEPRECATED
GType g_value_array_get_type (void) G_GNUC_CONST;
G_END_DECLS