lib/deltas: Move variant read helper into the deltas code
What the deltas code is doing is weird/unfortunate. The name `ot_variant_read()` conflicts too much with `ot_variant_read_fd()`. Since nothing else uses it, move it into the deltas code. Closes: #1254 Approved by: jlebon
This commit is contained in:
1 parent
a903f96673
commit
fc33ae018d
3 files changed
+15
-17
No files matched your search
@@ -81,19 +81,6 @@ ot_variant_read_fd (int fd,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get an input stream for a GVariant */
|
||||
GInputStream *
|
||||
ot_variant_read (GVariant *variant)
|
||||
{
|
||||
GMemoryInputStream *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;
|
||||
}
|
||||
|
||||
/* GVariants are immutable; this function allows generating an open builder
|
||||
* for a new variant, inherting the data from @variant.
|
||||
*/
|
||||
|
||||
@@ -39,8 +39,6 @@ gboolean ot_variant_read_fd (int fd,
|
||||
GVariant **out_variant,
|
||||
GError **error);
|
||||
|
||||
GInputStream *ot_variant_read (GVariant *variant);
|
||||
|
||||
GVariantBuilder *ot_util_variant_builder_from_variant (GVariant *variant,
|
||||
const GVariantType *type);
|
||||
|
||||
|
||||
Reference in new issue
Block a user