[goffice] Plugins: avoid hash order dependency.



commit 4c27d554b9d62d9bad8ede64b29ee6ec92e16de6
Author: Morten Welinder <terra gnome org>
Date:   Thu May 17 20:13:12 2018 -0400

    Plugins: avoid hash order dependency.
    
    Sort.

 ChangeLog               |    5 +++++
 NEWS                    |    1 +
 goffice/app/go-plugin.c |    2 ++
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 01e10eb..7087b82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-17  Morten Welinder  <terra gnome org>
+
+       * goffice/app/go-plugin.c (go_plugins_shutdown): Avoid hash order
+       dependency.
+
 2018-05-10  Morten Welinder  <terra gnome org>
 
        * goffice/app/file.c (go_file_saver_for_file_name): Pick the most
diff --git a/NEWS b/NEWS
index 00f9b03..2b5cbc6 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ goffice 0.10.42:
 Morten:
        * Introspection fixes.
        * Improve file saver api.
+       * Avoid hash order dependency for plugins.
 
 --------------------------------------------------------------------------
 goffice 0.10.41:
diff --git a/goffice/app/go-plugin.c b/goffice/app/go-plugin.c
index f00009e..910ba7f 100644
--- a/goffice/app/go-plugin.c
+++ b/goffice/app/go-plugin.c
@@ -1928,6 +1928,8 @@ go_plugins_shutdown (void)
            g_hash_table_size (plugin_file_state_dir_hash) == g_slist_length (used_plugin_state_strings)) {
                g_slist_free_full (used_plugin_state_strings, g_free);
                used_plugin_state_strings = NULL;
+       } else {
+               used_plugin_state_strings = g_slist_sort (used_plugin_state_strings, (GCompareFunc)strcmp);
        }
 
        g_hash_table_destroy (plugin_file_state_dir_hash);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]