]> sigrok.org Git - libsigrok.git/commitdiff
C++: Fix hash table initialisation in map_to_hash_variant.
authorMartin Ling <redacted>
Fri, 29 Aug 2014 16:35:46 +0000 (17:35 +0100)
committerMartin Ling <redacted>
Fri, 29 Aug 2014 16:35:46 +0000 (17:35 +0100)
bindings/cxx/classes.cpp

index bb7cec690d599c58b9500cfe3228a26451e2350b..403499de31697e6a49db9fe17e8e00b4a2fc6adb 100644 (file)
@@ -44,8 +44,7 @@ static const char *valid_string(const char *input)
 static GHashTable *map_to_hash_variant(map<string, Glib::VariantBase> input)
 {
        auto output = g_hash_table_new_full(
-               g_variant_hash, g_variant_equal, g_free,
-               (void (*)(void *))g_variant_unref);
+               g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
        for (auto entry : input)
                g_hash_table_insert(output,
                        g_strdup(entry.first.c_str()),