NULL Variants?
Nate Nielsen
nielsen-list at memberwebs.com
Mon Aug 29 09:32:01 PDT 2005
Havoc Pennington wrote:
>>Nate Nielsen wrote:
>>>When sending a DBUS variant across the wire, is there a way to specify a
>>>NULL/None/Missing value? I'm using the GLib bindings. I've tried various
>>>things and gotten crashes and big bad warnings.
>
> We used to have one and deleted it on purpose, I don't remember the full
> reason why but it's probably in the list archives.
And so off I went searching various archives, and found this:
> The NIL type:
>
> NIL doesn't make a hell of a lot of sense as a *type*, really it's a
> value that's allowed in *some* languages to replace a value of any
> type. I think we need to get rid of DBUS_TYPE_NIL since I can't make
> any sense out of it.
I agree that DBUS_TYPE_NILL doesn't makes less sense as a type. It makes
much more sense when used inside a variant. This is similar to how
DBUS_TYPE_DICT_ENTRY doesn't make much sense outside of an array.
That said, while reading through that thread in the list archives I
didn't find a solution. Any ideas? I need to represent missing values in
a variant (similar to SQL NULLs).
I would be bummed to have to implement a nasty hack such as Jakub's (no
offense) when using a modern system like dbus.
Cheers,
Nate
More information about the dbus
mailing list