Hi,

1) 
Saw some changes in evas_object_list.c yesterday and spotted some
minor stuff that could be tidied up... (see attached file
"tidyup.diff")

2)
Also, I was wondering if the idea behind the "for (l = list; l; l =
l->next)" is to avoid deferencing pointers in the condition each time
through the loop? This seems OK in evas_object_list_find, but as for
evas_object_list_append, we have:

   if (list->last) l = list->last;
   else for (l = list; l; l = l->next);
   l->next = new_l;

If the if condition here is false and the else condition executes,
then aren't we are screwed on "l->next = ..." since "l" will be NULL
on completion of the for loop?

3)
Also, in evas_object_list_remove I see that there is no check to
confirm that the in_item is actually present in the in_list before
removing it (if it was part of another list, it would get removed from
that one instead)... is this up to the caller to make sure the item is
actually a part of the list before attempting to remove it?

I haven't attempted patches for the last two things cos I'm not sure I
fully understand the usage...

thanks,

[EMAIL PROTECTED] (e-taro)
Index: evas_object_list.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/data/evas_object_list.c,v
retrieving revision 1.2
diff -u -r1.2 evas_object_list.c
--- evas_object_list.c	3 Apr 2005 14:22:17 -0000	1.2
+++ evas_object_list.c	4 Apr 2005 12:50:57 -0000
@@ -5,11 +5,10 @@
 evas_object_list_append(void *in_list, void *in_item)
 {
    Evas_Object_List *l, *new_l;
-   Evas_Object_List *list, *item;
+   Evas_Object_List *list;
    
    list = in_list;
-   item = in_item;
-   new_l = item;
+   new_l = in_item;
    new_l->next = NULL;
    if (!list) 
      {
@@ -29,11 +28,10 @@
 evas_object_list_prepend(void *in_list, void *in_item)
 {
    Evas_Object_List *new_l;
-   Evas_Object_List *list, *item;
+   Evas_Object_List *list;
    
    list = in_list;
-   item = in_item;   
-   new_l = item;
+   new_l = in_item;
    new_l->prev = NULL;
    if (!list) 
      {

Reply via email to