From 8b3ef714d8f94b96eaa9af238abe2b2f62b60bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= Date: Tue, 19 May 2020 09:26:29 +0200 Subject: Sort generated types and adjust expected accordingly --- tests/tools/expected-gtypes-body.h | 16 ++++++++-------- tests/tools/expected-gtypes.h | 8 ++++---- tools/glib-gtypes-generator.py | 2 +- 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' % -- cgit v1.2.1