Re: [gtk-list] glib datalists question




On Tue, 9 Nov 1999, Marc Verwerft wrote:
> I have a question about glib datalists :
>     Why does 'g_datalist_id_set_data_full'  not accept items when the
> datavalue is NULL or zero ?
> 
> I thought datalists had the same function as name/value pairs in CORBA.
> Am I wrong ? Am I trying to 'abuse' datalists or is there another
> explanation ?
> 

It looks to me like it will take a NULL value for the data as long as your
destroy notify function is NULL. The reason is that "NULL value" and
"unset" are equivalent (to set something to NULL, datalist just deletes it
from the list; if you set something to NULL, it's the same as removing
it). So you can't have a destroy func for something that's not in the
datalist.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]