[glib] GSocketService: clarify transfer semantics of incoming connections



commit c2f670ef492eac0ed8574fc4df1e561ff0b1c89a
Author: Dan Winship <danw gnome org>
Date:   Wed Apr 20 11:24:46 2011 -0400

    GSocketService: clarify transfer semantics of incoming connections
    
    The @connection parameter to the ::incoming signal is (transfer none),
    so you need to ref it if you want to keep it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=647746

 gio/gsocketservice.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsocketservice.c b/gio/gsocketservice.c
index 8d9f724..18877d0 100644
--- a/gio/gsocketservice.c
+++ b/gio/gsocketservice.c
@@ -260,6 +260,9 @@ g_socket_service_class_init (GSocketServiceClass *class)
    * handling of @connection, but may not block; in essence,
    * asynchronous operations must be used.
    *
+   * @connection will be unreffed once the signal handler returns, so
+   * you need to ref it yourself if you are planning to use it.
+   *
    * Returns: %TRUE to stop other handlers from being called
    *
    * Since: 2.22



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]