gdbusconnection: Document existing refcount semantics of closures

As per the previous few commits, explicitly document the established
reference counting semantics of the method call closure for
`g_dbus_connection_register_object_with_closures()`.

This isn’t ideal, but
`g_dbus_connection_register_object_with_closures()` has had these
semantics for 10 years now, and it’s a bit late to change them to
something neater.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3559
This commit is contained in:
Philip Withnall 2024-12-10 16:59:33 +00:00
parent 1b66bf4122
commit 557d2e498d
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA

View File

@ -6089,6 +6089,11 @@ register_with_closures_on_set_property (GDBusConnection *connection,
* Version of g_dbus_connection_register_object() using closures instead of a
* #GDBusInterfaceVTable for easier binding in other languages.
*
* Note that the reference counting semantics of the function wrapped by
* @method_call_closure are the same as those of
* [callback@Gio.DBusInterfaceMethodCallFunc]: ownership of a reference to the
* [class@Gio.DBusMethodInvocation] is transferred to the function.
*
* Returns: 0 if @error is set, otherwise a registration ID (never 0)
* that can be used with g_dbus_connection_unregister_object() .
*