[gtk/fix-action-muxer-parent-chain] Fix build with older GLib



commit cc282c00d271ad0a9cd911951aa7d2658b3bb6b3
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jun 20 08:22:56 2019 -0400

    Fix build with older GLib
    
    Turns out g_strv_equal is recent.

 testsuite/gtk/action.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
---
diff --git a/testsuite/gtk/action.c b/testsuite/gtk/action.c
index 7ca703bf78..a21fa611b1 100644
--- a/testsuite/gtk/action.c
+++ b/testsuite/gtk/action.c
@@ -72,6 +72,27 @@ menu_item_label_notify_count (ActionTest    *fixture,
   g_object_unref (item);
 }
 
+#if !GLIB_CHECK_VERSION(2,60,0)
+gboolean
+g_strv_equal (const gchar * const *strv1,
+              const gchar * const *strv2)
+{
+  g_return_val_if_fail (strv1 != NULL, FALSE);
+  g_return_val_if_fail (strv2 != NULL, FALSE);
+
+  if (strv1 == strv2)
+    return TRUE;
+
+  for (; *strv1 != NULL && *strv2 != NULL; strv1++, strv2++)
+    {
+      if (!g_str_equal (*strv1, *strv2))
+        return FALSE;
+    }
+
+  return (*strv1 == NULL && *strv2 == NULL);
+}
+#endif
+
 static void
 g_test_action_muxer (void)
 {


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