Commit ce8983b4 authored by Torsten Schönfeld's avatar Torsten Schönfeld

Fix compilation and testing against glib < 2.28.0

Do not try to use/test g_variant_lookup_value if glib is not new enough.

https://rt.cpan.org/Ticket/Display.html?id=127831
parent c318ab48
......@@ -497,9 +497,13 @@ gsize g_variant_n_children (GVariant *value);
GVariant_noinc * g_variant_get_child_value (GVariant *value, gsize index_);
#if GLIB_CHECK_VERSION (2, 28, 0)
# gboolean g_variant_lookup (GVariant *dictionary, const gchar *key, const gchar *format_string, ...);
GVariant_noinc * g_variant_lookup_value (GVariant *dictionary, const gchar *key, const GVariantType *expected_type);
#endif
# FIXME:
# gconstpointer g_variant_get_fixed_array (GVariant *value, gsize *n_elements, gsize element_size);
......
......@@ -205,7 +205,9 @@ note ('new_dict_entry');
}
note ('lookup_value');
{
SKIP: {
skip 'lookup_value', 3
unless Glib->CHECK_VERSION (2, 28, 0);
my $entries = [map { Glib::Variant->new_dict_entry (Glib::Variant->new_string ($_->[0]),
Glib::Variant->new_byte ($_->[1])) }
(['one' => 1], ['two' => 2], ['four' => 4], ['eight' => 8])];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment