From b71196ef073dc1c49f4e42c0380b553286fe426c Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 12 Oct 2021 17:54:00 +0200 Subject: Fix compiler warnings ('passing argument .. from incompatible pointer type') by passing (non)const argument --- xmpp-vala/src/module/xep/0191_blocking_command.vala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xmpp-vala/src') diff --git a/xmpp-vala/src/module/xep/0191_blocking_command.vala b/xmpp-vala/src/module/xep/0191_blocking_command.vala index be312581..987f538a 100644 --- a/xmpp-vala/src/module/xep/0191_blocking_command.vala +++ b/xmpp-vala/src/module/xep/0191_blocking_command.vala @@ -15,8 +15,8 @@ public class Module : XmppStreamModule, Iq.Handler { return stream.get_flag(Flag.IDENTITY).blocklist.contains(jid); } - public bool block(XmppStream stream, Gee.List jids) { - if (jids.size == 0) return false; // This would otherwise be a bad-request error. + public bool block(XmppStream stream, string[] jids) { + if (jids.length == 0) return false; // This would otherwise be a bad-request error. StanzaNode block_node = new StanzaNode.build("block", NS_URI).add_self_xmlns(); fill_node_with_items(block_node, jids); @@ -25,8 +25,8 @@ public class Module : XmppStreamModule, Iq.Handler { return true; } - public bool unblock(XmppStream stream, Gee.List jids) { - if (jids.size == 0) return false; // This would otherwise unblock all blocked JIDs. + public bool unblock(XmppStream stream, string[] jids) { + if (jids.length == 0) return false; // This would otherwise unblock all blocked JIDs. StanzaNode unblock_node = new StanzaNode.build("unblock", NS_URI).add_self_xmlns(); fill_node_with_items(unblock_node, jids); @@ -112,7 +112,7 @@ public class Module : XmppStreamModule, Iq.Handler { return jids; } - private void fill_node_with_items(StanzaNode node, Gee.List jids) { + private void fill_node_with_items(StanzaNode node, string[] jids) { foreach (string jid in jids) { StanzaNode item_node = new StanzaNode.build("item", NS_URI).add_self_xmlns(); item_node.set_attribute("jid", jid, NS_URI); -- cgit v1.2.3-70-g09d2