Problems with empty Arrays and Dicts in untyped languages
Colin Walters
walters at verbum.org
Thu Jul 28 05:31:21 EST 2005
On Wed, 2005-07-27 at 15:15 -0400, John (J5) Palmieri wrote:
> No the point is the other way around. When sending an empty array some
> languages have no way of knowing what array type to send without
> Introspection. DBUS_TYPE_EMPTY_ARRAY would free these languages from
> figuring it out by allowing an empty array to map to an array of any
> type.
>
> I'm not quite sure why this would be a problem in .Net or Java. If an
> array of anytype has no elements just marshal it to
> DBUS_TYPE_EMPTY_ARRAY.
The problem we're talking about is demarshalling, not marshalling.
DBUS_TYPE_EMPTY_ARRAY is problematic as for some languages it could be
important to know what would be contained in the array if it weren't
empty.
That's what Joe was referring to I think.
Joe, can you give some sample code for receiving arrays with Mono? Does
the caller specify what type of array/dictionary they're expecting to
receive?
More information about the dbus
mailing list