Re: [Multi-valued V2 (grilo) 11/12] core: Merge GrlDataMulti into GrlData

On Wed, 02 Mar 2011 14:09:59 +0100, "Juan A." Suárez Romero <jasuarez igalia com> wrote:
On Tue, 2011-03-01 at 11:18 +0000, Iago Toral wrote:
> +/**
> + * grl_data_remove_property:
> + * @data: a data
> + * @key: a metadata key
> + * @index: index of key to be removed, starting at 0
> + *
> + * Removes key and related keys from position in mdata.

 I think this does not remove any key ro related keys, but their
for index, right? Please in that case change the description and use
 to refer to parameters.

It removes the GrlProperty at @index position for @key in @data.

It means that if you previously had:

prop = grl_data_get_property (data, <key>, <index>)

After doing:

grl_data_remove_property (data, <key>, <index>)

Also, now that I think about it.
Do we have API to remove independent values? Something like grl_data_remove_nth (data, key, index) that does not take into account relations? If we do not have that (and I think we shouldn't have it because it would break the semantics of the relations) I think grl_data_remove_property could be just renamed to grl_data_remove_nth.

What I mean is that when we remove the value for one key we should always automatically remove all the data related to it, so I guess there is no reason here to have both remove_nth and remove_property.


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