nested arrays and get_element_type

Evan Martin martine at danga.com
Fri Jul 28 18:23:43 PDT 2006


On 7/29/06, Havoc Pennington <hp at redhat.com> wrote:
> Thiago Macieira wrote:
> > Havoc Pennington wrote:
> >>> I need to know what the full type is so if I want to take this
> >>> de-serialized message and re-serialize it back into a different
> >>> DBusMessage I can pass the appropriate args to open_container()...
> >>> right?
> >> Yep, for something like this you would need the whole type.
> >
> > I have some code that does exactly that. I called it "cross-marshalling".
>
> If this is a common thing people want to do, the following could be
> implemented internal to dbus with just a memcpy:
>
> [snip]
>
> I don't know the use-case or whether this optimization would matter though.

My real use case comes from that Haskell is finicky about types.  This
isn't normally a problem (it's part of the point of Haskell, really),
but when I deserialize a complicated nested structure like the example
I gave I'd like the resulting data structure to match the signature of
the data.

Thanks for your response.  I think I'll write something that parses
the signature.  Or maybe think of an alternative approach...


More information about the dbus mailing list