summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-06-20 08:22:56 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-06-20 08:22:56 -0400
commitcc282c00d271ad0a9cd911951aa7d2658b3bb6b3 (patch)
tree3e483dfa6ccd5def5252c01618c69847f1549300 /testsuite
parent08f216e11f4098935caaf8f2ed80c6ac0de6bf2a (diff)
downloadgtk+-cc282c00d271ad0a9cd911951aa7d2658b3bb6b3.tar.gz
Fix build with older GLib
Turns out g_strv_equal is recent.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gtk/action.c21
1 files changed, 21 insertions, 0 deletions
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)
{