Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_object.c 


Log Message:
fix shutdown
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_object.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- etk_object.c        3 Mar 2006 10:04:27 -0000       1.14
+++ etk_object.c        3 Mar 2006 11:43:38 -0000       1.15
@@ -97,7 +97,7 @@
 
    new_object = calloc(1,object_type->type_size);
    new_object->type = object_type;
-   _etk_object_created_objects = evas_hash_add(_etk_object_created_objects, 
(char*)new_object, (char*)1);
+   _etk_object_created_objects = evas_hash_add(_etk_object_created_objects, 
(char*)new_object, new_object);
    
    etk_type_object_construct(object_type, new_object);
    va_copy(args2, args);
@@ -118,7 +118,7 @@
 
    etk_signal_emit(_etk_object_signals[ETK_OBJECT_DESTROYED_SIGNAL], object, 
NULL);
    etk_type_destructors_call(object->type, object);
-   _etk_object_created_objects = evas_hash_del(_etk_object_created_objects, 
(char*)object, (char*)1);
+   _etk_object_created_objects = evas_hash_del(_etk_object_created_objects, 
(char*)object, object);
    free(object);
 }
 
@@ -129,7 +129,7 @@
 {
 //   while (_etk_object_created_objects)
 //      etk_object_destroy(ETK_OBJECT(_etk_object_created_objects->data));
-      evas_hash_foreach(_etk_object_created_objects, _etk_object_hash_foreach, 
NULL);
+   evas_hash_foreach(_etk_object_created_objects, _etk_object_hash_foreach, 
NULL);
 }
 
 void *etk_object_lookup(Etk_Object *object)
@@ -624,7 +624,8 @@
 /* Used when we want to iterate over the hash to destroy all objects */
 static Evas_Bool _etk_object_hash_foreach(Evas_Hash *hash, const char *key, 
void *data, void *fdata)
 {
-   etk_object_destroy(ETK_OBJECT(key));
+   /* destroying using the void *data seems to work better */
+   etk_object_destroy(ETK_OBJECT(data));
    return 1;
 }
 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to