[PATCH] GLib: Get the sender from the GMethodInvocation and
other fixes
Robert McQueen
robert.mcqueen at collabora.co.uk
Mon Nov 21 17:29:47 PST 2005
John (J5) Palmieri wrote:
> Here is a patch for getting the sender from a GMethodInvocation which is
> passed in on methods annotated as async.
>
> I also cleaned up the dbus_g_method_return_send_reply and
> dbus_g_method_return_get_reply methods to drop return from their names.
> This is consistent with the two other GMethodInvocation methods which
> use "return" as part of their method names and not as part of their
> namespace.
Looks fine to me, although a possible caveat: this returns a const
pointer to presumably memory from within the header cache, which might
be freed once the incoming message is unreferenced. Its worth
considering and documenting what the valid scope of the returned pointer
is expected to be, and either clarify it or consider if this function
should return eg a gchar * which the caller is responsible for freeing.
Regards,
Rob
More information about the dbus
mailing list