[gnome-builder] unsaved-files: remove use of set_free_func



commit 7a9670cbd5541ce13ecbd971dd92c30a906c7ffb
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 2 23:36:56 2018 -0800

    unsaved-files: remove use of set_free_func

 src/libide/buffers/ide-unsaved-files.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/buffers/ide-unsaved-files.c b/src/libide/buffers/ide-unsaved-files.c
index 101f921..28faa4d 100644
--- a/src/libide/buffers/ide-unsaved-files.c
+++ b/src/libide/buffers/ide-unsaved-files.c
@@ -649,8 +649,7 @@ ide_unsaved_files_to_array (IdeUnsavedFiles *self)
 
   g_return_val_if_fail (IDE_IS_UNSAVED_FILES (self), NULL);
 
-  ar = g_ptr_array_new ();
-  g_ptr_array_set_free_func (ar, (GDestroyNotify)ide_unsaved_file_unref);
+  ar = g_ptr_array_new_with_free_func ((GDestroyNotify)ide_unsaved_file_unref);
 
   for (guint i = 0; i < self->unsaved_files->len; i++)
     {


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