summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Kulík <kulikjak@gmail.com>2020-05-19 09:26:29 +0200
committerJakub Kulík <kulikjak@gmail.com>2020-05-19 09:26:29 +0200
commit8b3ef714d8f94b96eaa9af238abe2b2f62b60bae (patch)
tree2686a659642342f3fddcb608a2c5e277b0093d29
parent0868f6d539d25c3b67e7cb10ed4ad21ce77f411e (diff)
downloadtelepathy-glib-8b3ef714d8f94b96eaa9af238abe2b2f62b60bae.tar.gz
Sort generated types and adjust expected accordingly
-rw-r--r--tests/tools/expected-gtypes-body.h16
-rw-r--r--tests/tools/expected-gtypes.h8
-rw-r--r--tools/glib-gtypes-generator.py2
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/tools/expected-gtypes-body.h b/tests/tools/expected-gtypes-body.h
index be1db8a06..e575c818e 100644
--- a/tests/tools/expected-gtypes-body.h
+++ b/tests/tools/expected-gtypes-body.h
@@ -5,42 +5,42 @@
*/
GType
-the_prefix_type_dbus_hash_sv (void)
+the_prefix_type_dbus_hash_saa_7bsv_7d (void)
{
static GType t = 0;
if (G_UNLIKELY (t == 0))
- t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE);
+ t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)))));
return t;
}
GType
-the_prefix_type_dbus_hash_ss (void)
+the_prefix_type_dbus_hash_sa_7bsv_7d (void)
{
static GType t = 0;
if (G_UNLIKELY (t == 0))
- t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING);
+ t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)));
return t;
}
GType
-the_prefix_type_dbus_hash_sa_7bsv_7d (void)
+the_prefix_type_dbus_hash_ss (void)
{
static GType t = 0;
if (G_UNLIKELY (t == 0))
- t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)));
+ t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING);
return t;
}
GType
-the_prefix_type_dbus_hash_saa_7bsv_7d (void)
+the_prefix_type_dbus_hash_sv (void)
{
static GType t = 0;
if (G_UNLIKELY (t == 0))
- t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, (dbus_g_type_get_collection ("GPtrArray", (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)))));
+ t = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE);
return t;
}
diff --git a/tests/tools/expected-gtypes.h b/tests/tools/expected-gtypes.h
index e18f527b4..5164cab18 100644
--- a/tests/tools/expected-gtypes.h
+++ b/tests/tools/expected-gtypes.h
@@ -18,13 +18,13 @@
#define THE_PREFIX_ARRAY_TYPE_STRING_VARIANT_MAP_LIST_MAP_LIST (the_prefix_type_dbus_array_of_a_7bsaa_7bsv_7d_7d ())
-GType the_prefix_type_dbus_hash_sv (void);
-
-GType the_prefix_type_dbus_hash_ss (void);
+GType the_prefix_type_dbus_hash_saa_7bsv_7d (void);
GType the_prefix_type_dbus_hash_sa_7bsv_7d (void);
-GType the_prefix_type_dbus_hash_saa_7bsv_7d (void);
+GType the_prefix_type_dbus_hash_ss (void);
+
+GType the_prefix_type_dbus_hash_sv (void);
#define THE_PREFIX_STRUCT_TYPE_STRUCT (the_prefix_type_dbus_struct_isu ())
diff --git a/tools/glib-gtypes-generator.py b/tools/glib-gtypes-generator.py
index d531d910d..1a5e84d74 100644
--- a/tools/glib-gtypes-generator.py
+++ b/tools/glib-gtypes-generator.py
@@ -213,7 +213,7 @@ class GTypesGenerator(object):
for mapping in mappings:
self.do_mapping_header(mapping)
- for sig in self.need_mappings:
+ for sig in sorted(self.need_mappings):
self.h('GType %stype_dbus_hash_%s (void);\n\n' %
(self.prefix_, self.need_mappings[sig]))
self.c('GType\n%stype_dbus_hash_%s (void)\n{\n' %