[gnome-settings-daemon] plugins: Stop using GSlice
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] plugins: Stop using GSlice
- Date: Mon, 25 Apr 2022 08:30:31 +0000 (UTC)
commit 64ac7fc58f87971f12d2957433788567448a61cc
Author: Fernando Monteiro <fr02monteiro gmail com>
Date: Sat Apr 23 17:06:37 2022 +0100
plugins: Stop using GSlice
plugins/media-keys/bus-watch-namespace.c | 4 ++--
plugins/xsettings/xsettings-common.c | 5 ++---
plugins/xsettings/xsettings-manager.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/plugins/media-keys/bus-watch-namespace.c b/plugins/media-keys/bus-watch-namespace.c
index 1ffdff45..a9349b49 100644
--- a/plugins/media-keys/bus-watch-namespace.c
+++ b/plugins/media-keys/bus-watch-namespace.c
@@ -188,7 +188,7 @@ got_name_owner (GObject *object,
out:
g_free (data->name);
- g_slice_free (GetNameOwnerData, data);
+ g_free (data);
}
static void
@@ -224,7 +224,7 @@ names_listed (GObject *object,
{
if (dbus_name_has_namespace (name, watcher->name_space))
{
- GetNameOwnerData *data = g_slice_new (GetNameOwnerData);
+ GetNameOwnerData *data = g_new (GetNameOwnerData, 1);
data->watcher = watcher;
data->name = g_strdup (name);
g_dbus_connection_call (watcher->connection, "org.freedesktop.DBus", "/",
diff --git a/plugins/xsettings/xsettings-common.c b/plugins/xsettings/xsettings-common.c
index e5f9fcca..53c421a1 100644
--- a/plugins/xsettings/xsettings-common.c
+++ b/plugins/xsettings/xsettings-common.c
@@ -36,7 +36,7 @@ xsettings_setting_new (const gchar *name)
{
XSettingsSetting *result;
- result = g_slice_new0 (XSettingsSetting);
+ result = g_new0 (XSettingsSetting, 1);
result->name = g_strdup (name);
return result;
@@ -100,8 +100,7 @@ xsettings_setting_free (XSettingsSetting *setting)
g_variant_unref (setting->value[i]);
g_free (setting->name);
-
- g_slice_free (XSettingsSetting, setting);
+ g_free (setting);
}
char
diff --git a/plugins/xsettings/xsettings-manager.c b/plugins/xsettings/xsettings-manager.c
index a154ede2..89edef22 100644
--- a/plugins/xsettings/xsettings-manager.c
+++ b/plugins/xsettings/xsettings-manager.c
@@ -134,7 +134,7 @@ xsettings_manager_new (Display *display,
XFixesSetClientDisconnectMode (display, XFixesClientDisconnectFlagTerminate);
- manager = g_slice_new (XSettingsManager);
+ manager = g_new (XSettingsManager, 1);
manager->display = display;
manager->screen = screen;
@@ -198,7 +198,7 @@ xsettings_manager_destroy (XSettingsManager *manager)
g_hash_table_unref (manager->settings);
- g_slice_free (XSettingsManager, manager);
+ g_free (manager);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]