returning a struct with dbus-glib bindings?

Colin Walters walters at verbum.org
Thu Dec 4 12:35:33 PST 2008


On Wed, Dec 3, 2008 at 2:49 AM, Nick Welch <nick at incise.org> wrote:
> I've run out of places to search for ideas.  I found a couple things on google
> about returning an array of structs, but nothing about just one struct (seems
> odd).

Yeah, the docs in general need love.

> i.e. a struct of two 16 byte ints.  First of all, outside of <typedef short
> gshort>, glib seems to completely ignore the existence of 16 byte integers.
> There is no G_TYPE_SHORT (or G_TYPE_INT16), for example.

Right; unfortunately from looking at the code I think the answer right
now is that you can't send (u)int16 with dbus-glib.

Practically speaking, I think using int32 is easier all around and it
seems rather unlikely to me that using int16 vs int32 would show up in
any noticeable way in performance profiles.  Still though it is
something we should allow; I guess we'd have to register custom gtypes
for them since their inclusion in glib has been shot down.


More information about the dbus mailing list