-gboolean enum_val_equal(gconstpointer a, gconstpointer b)
-{
- int64_t ua = *(const int64_t *)a;
- int64_t ub = *(const int64_t *)b;
-
- return ua == ub;
-}
-
-static
-void enum_val_free(void *ptr)
-{
- g_free(ptr);
-}
-
-static
-void enum_signed_insert_value_to_quark_set(struct type_enum *enum_type,
- int64_t v, GQuark q)
-{
- int64_t *valuep;
- GArray *array;
-
- array = g_hash_table_lookup(enum_type->table.value_to_quark_set, &v);
- if (!array) {
- array = g_array_sized_new(FALSE, TRUE, sizeof(GQuark), 1);
- g_array_set_size(array, 1);
- g_array_index(array, GQuark, array->len - 1) = q;
- valuep = g_new(int64_t, 1);
- *valuep = v;
- g_hash_table_insert(enum_type->table.value_to_quark_set, valuep, array);
- } else {
- g_array_set_size(array, array->len + 1);
- g_array_index(array, GQuark, array->len - 1) = q;
- }
-}
-
-static
-void enum_unsigned_insert_value_to_quark_set(struct type_enum *enum_type,