Fix a couple of delegate copy warnigs
"warning: copying delegates is not supported"
This commit is contained in:
parent
95596e25a5
commit
1be1d47122
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -567,7 +567,7 @@ public class Connection : IOStream {
|
|||
}
|
||||
SourceFunc callback = wait_and_check_for_errors.callback;
|
||||
ulong id = cancellable.connect(() => callback());
|
||||
callbacks.add(new OnSetInnerCallback() { callback=callback, io_priority=io_priority});
|
||||
callbacks.add(new OnSetInnerCallback() { callback=(owned)callback, io_priority=io_priority});
|
||||
yield;
|
||||
cancellable.disconnect(id);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class Module : XmppStreamModule {
|
|||
}
|
||||
StanzaNode query_node = new StanzaNode.build("query", NS_VER(stream)).add_self_xmlns().put_node(data_form.get_submit_node());
|
||||
Iq.Stanza iq = new Iq.Stanza.set(query_node);
|
||||
stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, (stream, iq) => { page_through_results(stream, iq, on_finished); });
|
||||
stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, (stream, iq) => { page_through_results(stream, iq, (owned)on_finished); });
|
||||
}
|
||||
|
||||
public override void attach(XmppStream stream) {
|
||||
|
@ -69,7 +69,7 @@ public class Module : XmppStreamModule {
|
|||
)
|
||||
)
|
||||
);
|
||||
stream.get_module(Iq.Module.IDENTITY).send_iq(stream, paging_iq, (stream, iq) => { page_through_results(stream, iq, on_finished); });
|
||||
stream.get_module(Iq.Module.IDENTITY).send_iq(stream, paging_iq, (stream, iq) => { page_through_results(stream, iq, (owned)on_finished); });
|
||||
}
|
||||
|
||||
private void query_availability(XmppStream stream) {
|
||||
|
|
Loading…
Reference in a new issue