[libpanel/gbsneto/no-autofree: 2/12] dock-switcher: Drop g_auto* usage
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpanel/gbsneto/no-autofree: 2/12] dock-switcher: Drop g_auto* usage
- Date: Mon, 5 Sep 2022 19:56:52 +0000 (UTC)
commit 71fd9af148137647460e6ce266ae65997a4616a1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Sep 5 16:20:27 2022 -0300
dock-switcher: Drop g_auto* usage
src/panel-dock-switcher.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/panel-dock-switcher.c b/src/panel-dock-switcher.c
index 528afc7..3a449cd 100644
--- a/src/panel-dock-switcher.c
+++ b/src/panel-dock-switcher.c
@@ -174,7 +174,7 @@ panel_dock_switcher_notify_can_reveal_cb (PanelDock *dock,
GParamSpec *pspec,
GtkRevealer *revealer)
{
- g_auto(GValue) value = G_VALUE_INIT;
+ GValue value = G_VALUE_INIT;
g_assert (PANEL_IS_DOCK (dock));
g_assert (G_IS_PARAM_SPEC_BOOLEAN (pspec));
@@ -192,6 +192,8 @@ panel_dock_switcher_notify_can_reveal_cb (PanelDock *dock,
{
gtk_revealer_set_reveal_child (revealer, FALSE);
}
+
+ g_value_unset (&value);
}
static void
@@ -223,7 +225,7 @@ panel_dock_switcher_set_dock (PanelDockSwitcher *self,
if (self->dock)
{
const char *nick = NULL;
- g_autofree char *notify = NULL;
+ char *notify = NULL;
switch (self->position)
{
@@ -261,6 +263,8 @@ panel_dock_switcher_set_dock (PanelDockSwitcher *self,
G_CALLBACK (panel_dock_switcher_notify_can_reveal_cb),
self->revealer,
0);
+
+ g_clear_pointer (¬ify, g_free);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]