[gnome-builder] xdg-app: track xdg-app API changes



commit b6edba04da27d549218bd98fb768a2841fa28b29
Author: Christian Hergert <christian hergert me>
Date:   Thu Feb 18 15:55:20 2016 -0800

    xdg-app: track xdg-app API changes

 plugins/xdg-app/configure.ac               |    2 +-
 plugins/xdg-app/gbp-xdg-runtime-provider.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/xdg-app/configure.ac b/plugins/xdg-app/configure.ac
index 6fecd09..4763700 100644
--- a/plugins/xdg-app/configure.ac
+++ b/plugins/xdg-app/configure.ac
@@ -1,4 +1,4 @@
-m4_define([xdg_app_required_version], [0.4.8])
+m4_define([xdg_app_required_version], [0.4.11])
 
 # --enable-xdg-app-plugin=yes/no/auto
 AC_ARG_ENABLE([xdg-app-plugin],
diff --git a/plugins/xdg-app/gbp-xdg-runtime-provider.c b/plugins/xdg-app/gbp-xdg-runtime-provider.c
index 72da3e3..42b944a 100644
--- a/plugins/xdg-app/gbp-xdg-runtime-provider.c
+++ b/plugins/xdg-app/gbp-xdg-runtime-provider.c
@@ -98,9 +98,11 @@ gbp_xdg_runtime_provider_load_worker (GTask        *task,
       g_autofree gchar *name = NULL;
       const gchar *arch;
       const gchar *branch;
-      g_autofree gchar *metadata = NULL;
+      g_autoptr(GBytes) metadata = NULL;
       g_autofree gchar *sdk = NULL;
       g_autoptr(GKeyFile) key_file = NULL;
+      const gchar *metadata_data;
+      gsize metadata_len;
 
       g_assert (XDG_APP_IS_INSTALLED_REF (ref));
 
@@ -128,9 +130,11 @@ gbp_xdg_runtime_provider_load_worker (GTask        *task,
           continue;
         }
 
+      metadata_data = g_bytes_get_data (metadata, &metadata_len);
+
       key_file = g_key_file_new ();
 
-      if (!g_key_file_load_from_data (key_file, metadata, -1, G_KEY_FILE_NONE, &error))
+      if (!g_key_file_load_from_data (key_file, metadata_data, metadata_len, G_KEY_FILE_NONE, &error))
         {
           /*
            * If this is not really a runtime, but something like a locale, then


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