NULL Variants?
Jakub Piotr Cłapa
jpc at pld-linux.org
Mon Aug 29 09:50:27 PDT 2005
Nate Nielsen wrote:
> 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).
So maybe a NILL type should be brought back?
> I would be bummed to have to implement a nasty hack such as Jakub's (no
> offense) when using a modern system like dbus.
I'm not offended -- I perfectly understand that this is a nasty hack but
as with most nasty hacks I had little choice. ;]
--
Regards,
Jakub Piotr Cłapa
More information about the dbus
mailing list