Blame d38f972c8cb958524b326986c6dc72b24fa35dad.patch

c450698
From d38f972c8cb958524b326986c6dc72b24fa35dad Mon Sep 17 00:00:00 2001
c450698
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
c450698
 <congdanhqx@gmail.com>
c450698
Date: Sat, 4 Apr 2020 10:53:14 +0700
c450698
Subject: [PATCH] utils: adjust to change in vte3>0.59.0
c450698
c450698
vte3 has changed the parameter to Terminal::feed_child from char[]
c450698
to uint8[]
c450698
---
c450698
 CMakeLists.txt | 4 ++++
c450698
 lib/utils.vala | 6 ++++++
c450698
 2 files changed, 10 insertions(+)
c450698
c450698
diff --git a/CMakeLists.txt b/CMakeLists.txt
c450698
index a3cea091..458ea4ab 100644
c450698
--- a/CMakeLists.txt
c450698
+++ b/CMakeLists.txt
c450698
@@ -30,6 +30,10 @@ option(USE_VENDOR_LIB "Backport support for debian stretch" ON)
c450698
 
c450698
 if (NOT USE_VENDOR_LIB)
c450698
 pkg_check_modules(VTE REQUIRED vte-2.91)
c450698
+# There're 3 releases for 0.59.x, only 0.59.0 keeps old behaviour
c450698
+if("${VTE_VERSION}" VERSION_GREATER "0.59.0")
c450698
+    list(APPEND ARGS_DEFINITIONS "VTE_0_60")
c450698
+endif()
c450698
 endif()
c450698
 
c450698
 if (NOT DEFINED VERSION)
c450698
diff --git a/lib/utils.vala b/lib/utils.vala
c450698
index 9f3c36e8..3241d5ce 100644
c450698
--- a/lib/utils.vala
c450698
+++ b/lib/utils.vala
c450698
@@ -607,7 +607,13 @@ namespace Utils {
c450698
         return command;
c450698
     }
c450698
 
c450698
+#if VTE_0_60
c450698
+    public uint8[] to_raw_data(string str) {
c450698
+        return str.data;
c450698
+    }
c450698
+#else
c450698
     public char[] to_raw_data(string str) {
c450698
         return str.to_utf8();
c450698
     }
c450698
+#endif
c450698
 }