[mutter] meta: Remove meta_free_gslist_and_elements
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] meta: Remove meta_free_gslist_and_elements
- Date: Wed, 15 May 2019 20:05:46 +0000 (UTC)
commit f7ecf3b6187e21cbcd1574021a5b22968e8d1983
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Wed May 15 14:28:55 2019 -0500
meta: Remove meta_free_gslist_and_elements
This function was added for historic reasons, before that we had GSlist's
free_full function.
Since this can be now easily implemented with a function call and an explicit
GDestroyFunc, while no known dependency uses it let's move to use
g_slist_free_func instead.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/57
src/core/util.c | 11 -----------
src/core/window.c | 2 +-
src/meta/util.h | 3 ---
src/x11/window-x11.c | 2 +-
4 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/core/util.c b/src/core/util.c
index e5503139b..5e37c45aa 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -241,17 +241,6 @@ utf8_fputs (const char *str,
return retval;
}
-/**
- * meta_free_gslist_and_elements: (skip)
- * @list_to_deep_free: list to deep free
- *
- */
-void
-meta_free_gslist_and_elements (GSList *list_to_deep_free)
-{
- g_slist_free_full (list_to_deep_free, g_free);
-}
-
#ifdef WITH_VERBOSE_MODE
void
meta_debug_spew_real (const char *format, ...)
diff --git a/src/core/window.c b/src/core/window.c
index 8219e6b35..ff564250e 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1525,7 +1525,7 @@ meta_window_unmanage (MetaWindow *window,
if (window->struts)
{
- meta_free_gslist_and_elements (window->struts);
+ g_slist_free_full (window->struts, g_free);
window->struts = NULL;
meta_topic (META_DEBUG_WORKAREA,
diff --git a/src/meta/util.h b/src/meta/util.h
index 497cea99b..6f3a98799 100644
--- a/src/meta/util.h
+++ b/src/meta/util.h
@@ -149,9 +149,6 @@ char* meta_external_binding_name_for_action (guint keybinding_action);
META_EXPORT
char* meta_g_utf8_strndup (const gchar *src, gsize n);
-META_EXPORT
-void meta_free_gslist_and_elements (GSList *list_to_deep_free);
-
META_EXPORT
GPid meta_show_dialog (const char *type,
const char *message,
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 6f3675cbc..edb378ae9 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -1559,7 +1559,7 @@ meta_window_x11_update_struts (MetaWindow *window)
changed = (old_iter != NULL || new_iter != NULL);
/* Update appropriately */
- meta_free_gslist_and_elements (old_struts);
+ g_slist_free_full (old_struts, g_free);
window->struts = new_struts;
return changed;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]