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



commit ade090191f537422fe2021b8cba3c3b9385bf993
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu May 10 21:03:13 2018 +0200

    StyleScheme: fix compil warning (-Wcast-function-type)

 gtksourceview/gtksourcestylescheme.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index 06c59fc..d323285 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -134,7 +134,6 @@ gtk_source_style_scheme_finalize (GObject *object)
 
        if (scheme->priv->authors != NULL)
        {
-               g_ptr_array_foreach (scheme->priv->authors, (GFunc)g_free, NULL);
                g_ptr_array_free (scheme->priv->authors, TRUE);
        }
 
@@ -1234,7 +1233,7 @@ parse_style_scheme_child (GtkSourceStyleScheme *scheme,
        {
                xmlChar *tmp = xmlNodeGetContent (node);
                if (scheme->priv->authors == NULL)
-                       scheme->priv->authors = g_ptr_array_new ();
+                       scheme->priv->authors = g_ptr_array_new_with_free_func (g_free);
 
                g_ptr_array_add (scheme->priv->authors, g_strdup ((char*) tmp));
 


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