[gnome-font-viewer] Use g_auto(GStrv) to free string arrays
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-font-viewer] Use g_auto(GStrv) to free string arrays
- Date: Sat, 6 Jul 2019 15:55:27 +0000 (UTC)
commit f08938213273283b02477299868c42711681c495
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jul 6 08:54:50 2019 -0700
Use g_auto(GStrv) to free string arrays
If we mark them with g_autofree only the container will be released.
src/font-thumbnailer.c | 2 +-
src/font-view.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/font-thumbnailer.c b/src/font-thumbnailer.c
index 5b80583..0235e24 100644
--- a/src/font-thumbnailer.c
+++ b/src/font-thumbnailer.c
@@ -160,7 +160,7 @@ main (int argc,
g_autoptr(GFile) file = NULL;
g_autoptr(GOptionContext) context = NULL;
g_autofree gchar *contents = NULL, *help = NULL, *str = NULL, *uri = NULL;
- g_autofree gchar **arguments = NULL;
+ g_auto(GStrv) arguments = NULL;
FT_Error error;
FT_Library library;
FT_Face face;
diff --git a/src/font-view.c b/src/font-view.c
index 23ac16c..cf218c4 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -116,7 +116,7 @@ static void ensure_window (FontViewApplication *self);
static void
strip_whitespace (gchar **original)
{
- g_autofree gchar **split = NULL;
+ g_auto(GStrv) split = NULL;
g_autoptr(GString) reassembled = NULL;
const gchar *str;
gint idx, n_stripped;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]