From 1be1d471222b6d3763df1ad9b9d3b631ac8185f1 Mon Sep 17 00:00:00 2001 From: hrxi Date: Mon, 22 Jul 2019 10:41:26 +0200 Subject: Fix a couple of delegate copy warnigs "warning: copying delegates is not supported" --- xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala') diff --git a/xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala b/xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala index 9af9f30e..5d59d18c 100644 --- a/xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala +++ b/xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala @@ -149,25 +149,25 @@ public class Connection : IOStream { output = new Output(this); } - public void set_read_callback(SourceFunc callback, Cancellable? cancellable, int io_priority) throws IOError { + public void set_read_callback(owned SourceFunc callback, Cancellable? cancellable, int io_priority) throws IOError { if (read_callback != null) { throw new IOError.PENDING("only one async read is permitted at a time on an in-band bytestream"); } if (cancellable != null) { read_callback_cancellable_id = cancellable.connect(trigger_read_callback); } - read_callback = callback; + read_callback = (owned)callback; read_callback_cancellable = cancellable; read_callback_priority = io_priority; } - public void set_write_callback(SourceFunc callback, Cancellable? cancellable, int io_priority) throws IOError { + public void set_write_callback(owned SourceFunc callback, Cancellable? cancellable, int io_priority) throws IOError { if (write_callback != null) { throw new IOError.PENDING("only one async write is permitted at a time on an in-band bytestream"); } if (cancellable != null) { write_callback_cancellable_id = cancellable.connect(trigger_write_callback); } - write_callback = callback; + write_callback = (owned)callback; write_callback_cancellable = cancellable; write_callback_priority = io_priority; } -- cgit v1.2.3-54-g00ecf