[RFC] API addition for GSequence



Hi all,

I'd be interested in hearing some opinions on the patch I logged in http://bugzilla.gnome.org/show_bug.cgi?id=548666

It adds the functions g_sequence_find and g_sequence_find_iter. These allow you to search for a given data in the sequence, returning NULL if that data isn't there.

The currently available g_sequence_search does not give you any way of telling if a given data is already in the sequence, it only lets you see where the data would be inserted.

A user could iterate the sequence like its a list, but as its a balanceed btree undreneath it should expose this functionality in some way.

I'm not so sure about the naming of the API, but I'd hope we could get something equivalent in for the next release.

Thanks,
Rob

--
Rob Taylor, Codethink Ltd. - http://codethink.co.uk


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