aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/core')
-rw-r--r--xmpp-vala/src/core/module_flag.vala10
-rw-r--r--xmpp-vala/src/core/xmpp_stream.vala4
2 files changed, 12 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/module_flag.vala b/xmpp-vala/src/core/module_flag.vala
index 95547852..76ae4dc1 100644
--- a/xmpp-vala/src/core/module_flag.vala
+++ b/xmpp-vala/src/core/module_flag.vala
@@ -10,7 +10,12 @@ namespace Xmpp {
}
public T? cast(XmppStreamFlag flag) {
+#if VALA_0_56_11
+ // We can't typecheck due to compiler bug
+ return (T) module;
+#else
return flag.get_type().is_a(typeof(T)) ? (T?) flag : null;
+#endif
}
public bool matches(XmppStreamFlag module) {
@@ -34,7 +39,12 @@ namespace Xmpp {
}
public T? cast(XmppStreamModule module) {
+#if VALA_0_56_11
+ // We can't typecheck due to compiler bug
+ return (T) module;
+#else
return module.get_type().is_a(typeof(T)) ? (T?) module : null;
+#endif
}
public bool matches(XmppStreamModule module) {
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala
index 42e90bf9..54433b67 100644
--- a/xmpp-vala/src/core/xmpp_stream.vala
+++ b/xmpp-vala/src/core/xmpp_stream.vala
@@ -30,9 +30,9 @@ public abstract class Xmpp.XmppStream : Object {
this.remote_name = remote_name;
}
- public abstract async void connect() throws IOError;
+ public abstract new async void connect() throws IOError;
- public abstract async void disconnect() throws IOError;
+ public abstract new async void disconnect() throws IOError;
public abstract async StanzaNode read() throws IOError;