[patch] remove DBusGPendingCall
walters at verbum.org
Wed Jul 6 08:55:53 PDT 2005
On Wed, 2005-07-06 at 11:45 -0400, Ray Strode wrote:
> > The trick GnomeVFS does is to expose what looks like a structure pointer
> > in the API, but is actually just a guint internally. So that's what
> > I've done as well.
> Why do you do that? I mean why not just return an opaque pointer that
> the internal code can dereference directly? I guess what I'm saying
> is, what's the point of the counter middle man?
I do return an opaque pointer; the client code never knows it doesn't
point to allocated memory. This way there's no need to define a
structure, allocate it, etc. Converting the DBusGProxyCall * pointer
into a guint will be a very cheap operation, just a few processor cycles
at most I imagine if any. If we get to that level of optimization I
will be very happy :)
If the hash table turns out to be a bottleneck we can look at turning it
into a real structure, it won't affect the API. There's just more
important things to do for now...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050706/291cdb3c/attachment.pgp
More information about the dbus