[vala/staging] tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54
- Date: Tue, 13 Nov 2018 06:55:50 +0000 (UTC)
commit 28c9e2f7788c1027be39eaaf0076f01268faca43
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Nov 12 10:27:45 2018 +0100
tests: Avoid use of g_ptr_array_find() which requires glib >= 2.54
tests/basic-types/gptrarray.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/tests/basic-types/gptrarray.vala b/tests/basic-types/gptrarray.vala
index f32a7330c..6d8aa2d1a 100644
--- a/tests/basic-types/gptrarray.vala
+++ b/tests/basic-types/gptrarray.vala
@@ -41,11 +41,13 @@ void main () {
assert (foo4.ref_count == 1);
assert (array.length == 3);
+#if GLIB_2_54
uint index;
assert (array.find (foo5, out index));
assert (foo5.ref_count == 2);
assert (index == 1);
assert (array.length == 3);
+#endif
array.sort (compare_foo);
array.sort_with_data (compare_foo);
@@ -86,11 +88,13 @@ void main () {
assert (foo4.ref_count == 1);
assert (array.length == 3);
+#if GLIB_2_54
uint index;
assert (array.find (foo5, out index));
assert (foo5.ref_count == 1);
assert (index == 1);
assert (array.length == 3);
+#endif
array.sort (compare_foo);
array.sort_with_data (compare_foo);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]