mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 23:43:39 +02:00
GVariant: improve bytestring support
- add G_VARIANT_TYPE_BYTESTRING, _BYTESTRING_ARRAY, _STRING_ARRAY - remove g_variant_{new,get}_byte_array functions - add g_variant_{new,get,dup}_bytestring{,_array} functions - remove undocumented support for deserialising arrays of objectpaths or signature strngs using g_variant_get_strv() - add and document new format strings '^ay', '^&ay', '^aay' and '^a&ay' - update GApplication to use the new API - update GSettings binding code to use the new API - add tests
This commit is contained in:
@@ -1006,7 +1006,7 @@ test_simple_binding (void)
|
||||
|
||||
g_object_set (obj, "string", "non-unicode:\315", NULL);
|
||||
value = g_settings_get_value (settings, "chararray");
|
||||
g_assert_cmpstr (g_variant_get_byte_array (value, NULL), ==, "non-unicode:\315");
|
||||
g_assert_cmpstr (g_variant_get_bytestring (value), ==, "non-unicode:\315");
|
||||
g_variant_unref (value);
|
||||
|
||||
g_settings_bind (settings, "double", obj, "double", G_SETTINGS_BIND_DEFAULT);
|
||||
|
Reference in New Issue
Block a user