how many types would a 'g' type type if a 'g' type would GType?

Havoc Pennington hp at redhat.com
Sat Sep 23 18:30:18 PDT 2006


Robert McQueen wrote:
>> However, I think it isn't allowed to have multiple types when
>> it's the signature of a variant. Don't remember for sure.
> 
> Well, a variant can only contain one type. Does this mean we could
> assume/enforce that inside a message (but not in the signature header)
> that 'g' is a single complete type?

It is enforced or at least assumed for the type tag of a variant, but 
not for just a random message arg. I guess we could assume it for a 
random message arg, but it seems a little arbitrary (and backward 
incompatible). You could just as easily use the 'g' type for passing a 
whole signature, e.g. if you did a binary introspection protocol or 
something. Restricting it doesn't seem to have any fundamental basis, 
just convenience for the glib bindings / this particular method call 
you're doing.

Come to think of it, instead of GetParameters -> a{sg} you could about 
as easily have done GetParameters -> ga{s} ...

Havoc



More information about the dbus mailing list