[Vala] add_inet_port's(GSocketListener) source_object is optional
- From: Darren Hoo <darren hoo gmail com>
- To: vala-list gnome org
- Subject: [Vala] add_inet_port's(GSocketListener) source_object is optional
- Date: Sun, 13 Sep 2009 06:29:44 +0800
Hi,
I am trying the GIONetworkingSample [1].
compiling the gio-server sample has the following warning:
warning: Argument 2: Cannot pass null to non-null parameter type
service.add_inet_port (8080, null);
^^^^
according the signature of g_socket_listener_add_inet_port [2]
the source_object is optional.so I assume the value source_object
passed to add_inet_port can be nullable.
Am I right?
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 2cba3a7..6af4d5b 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -785,7 +785,7 @@ namespace GLib {
public void accept_socket_async (GLib.Cancellable? cancellable,
GLib.AsyncReadyCallback callback);
public unowned GLib.Socket accept_socket_finish (GLib.AsyncResult
_result, out unowned GLib.Object source_object) throws GLib.Error;
public bool add_address (GLib.SocketAddress address,
GLib.SocketType type, GLib.SocketProtocol protocol, GLib.Object
source_object, out unowned GLib.SocketAddress effective_address)
throws GLib.Error;
- public bool add_inet_port (uint16 port, GLib.Object source_object)
throws GLib.Error;
+ public bool add_inet_port (uint16 port, GLib.Object? source_object)
throws GLib.Error;
public bool add_socket (GLib.Socket socket, GLib.Object
source_object) throws GLib.Error;
[NoWrapper]
public virtual void changed ();
[1] http://live.gnome.org/Vala/GIONetworkingSample
[2] http://library.gnome.org/devel/gio/unstable/GSocketListener.html#g-socket-listener-add-inet-port
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]