mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
Revert "libotutil: Make use of GBytes in ot_variant_read()"
This reverts commit c77908bf514d61e75798932f61b5b414d9e36a3c; we can't do this since g_variant_get_data_as_bytes() is a GLib 2.36 API.
This commit is contained in:
parent
b35840e1b8
commit
326be41d12
@ -190,12 +190,12 @@ GInputStream *
|
||||
ot_variant_read (GVariant *variant)
|
||||
{
|
||||
GMemoryInputStream *ret = NULL;
|
||||
gs_unref_bytes GBytes *bytes = NULL;
|
||||
|
||||
bytes = g_variant_get_data_as_bytes (variant);
|
||||
ret = (GMemoryInputStream*)g_memory_input_stream_new ();
|
||||
g_memory_input_stream_add_bytes (ret, bytes);
|
||||
|
||||
ret = (GMemoryInputStream*)g_memory_input_stream_new_from_data (g_variant_get_data (variant),
|
||||
g_variant_get_size (variant),
|
||||
NULL);
|
||||
g_object_set_data_full ((GObject*)ret, "ot-variant-data",
|
||||
g_variant_ref (variant), (GDestroyNotify) g_variant_unref);
|
||||
return (GInputStream*)ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user