GBytes: A new type for an immutable set of bytes.

* Represents an immutable reference counted block of memory.
 * This is basically the internal glib GBuffer structure exposed,
   renamed, and with some additional capabilities.
 * The GBytes name comes from python3's immutable 'bytes' type
 * GBytes can be safely used as keys in hash tables, and have
   functions for doing so: g_bytes_hash, g_bytes_equal
 * GByteArray is a mutable form of GBytes, and vice versa. There
   are functions for converting from one to the other efficiently:
   g_bytes_unref_to_array() and g_byte_array_free_to_bytes()
 * Adds g_byte_array_new_take() to support above functions

https://bugzilla.gnome.org/show_bug.cgi?id=663291
This commit is contained in:
Stef Walter
2011-11-11 17:08:26 +01:00
parent 069ec3719c
commit fcc69fd318
25 changed files with 1101 additions and 370 deletions

View File

@@ -349,6 +349,7 @@ G_TYPE_MATCH_INFO
G_TYPE_ARRAY
G_TYPE_BYTE_ARRAY
G_TYPE_PTR_ARRAY
G_TYPE_BYTES
G_TYPE_VARIANT_TYPE
G_TYPE_ERROR
G_TYPE_DATE_TIME