[gtksourceview] Language parser: fix compil warning (-Wcast-function-type)



commit f95db3fd3fa8801ec7b08ee2480b7f236ef4b3db
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu May 10 21:27:35 2018 +0200

    Language parser: fix compil warning (-Wcast-function-type)

 gtksourceview/gtksourcelanguage-parser-2.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcelanguage-parser-2.c b/gtksourceview/gtksourcelanguage-parser-2.c
index b699d6f..8b61ec0 100644
--- a/gtksourceview/gtksourcelanguage-parser-2.c
+++ b/gtksourceview/gtksourcelanguage-parser-2.c
@@ -1825,8 +1825,7 @@ _gtk_source_language_file_parse_version2 (GtkSourceLanguage       *language,
                                            (GHRFunc) steal_styles_mapping,
                                            language->priv->styles);
 
-       g_queue_foreach (replacements, (GFunc) _gtk_source_context_replace_free, NULL);
-       g_queue_free (replacements);
+       g_queue_free_full (replacements, (GDestroyNotify) _gtk_source_context_replace_free);
        g_hash_table_destroy (loaded_lang_ids);
        g_hash_table_destroy (defined_regexes);
        g_hash_table_destroy (styles);


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