On Sat, Aug 2, 2008 at 9:49 AM, Gustavo Sverzut Barbieri
<[EMAIL PROTECTED]> wrote:
>
> I don't want everyone to always use it, it can be kept as a helper and
> people who wish to have an abstract data model (usually void *) and
> access it as a list can provide the iterator. I use it in my mvc
> lists, something like: model_set(void *model, eina_iterator_t
> *(*accessor_constructor)(void *model)) and whenever I want to iterate
> the whole list, I delete the old, create a new and start the loop.

I think the iterator should be absolutely required to access the list
contents. There have been many bugs in code that uses evas_lists
simply because the API is designed to maintain references into
internal structures (the list nodes). The mempool makes this even more
difficult to debug since the nodes are not freed, and are often
re-used as other list nodes. Even if they are not re-used, they can
contain pointers within the remnants of the list and so appears valid.

> It's a bit different as it's an external structure, you can create as
> much iterators or accessors as you want and use them in different
> ways. What you CAN'T is modify the iterated/accessed object while it's
> in use.

This is basically what we've been proposing for ecore_lists except for
the non-modify requirement. What reason do you have for not allowing
any modifications through the iterators?

Nathan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to