Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin Modified Files: main.c Log Message: Use a global instead of the data set, more efficient and the const string won't have the same pointer address under all compilers. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- main.c 12 Mar 2006 06:14:29 -0000 1.23 +++ main.c 15 Mar 2006 05:26:34 -0000 1.24 @@ -36,6 +36,8 @@ static int current_unit_test = 0; static Ecore_Timer *unit_test_timer = NULL; +static Ewl_Test *current_test = NULL; + int main(int argc, char **argv) { @@ -132,7 +134,6 @@ } else { - ecore_timer_del(unit_test_timer); unit_test_timer = NULL; current_unit_test = 0; ret = 0; @@ -516,8 +517,7 @@ ewl_container_reset(EWL_CONTAINER(tree)); - /* attach the test data to the button */ - ewl_widget_data_set(button, "test", test); + current_test = test; /* just clean up if no tests */ if (!test->unit_tests) return; @@ -548,7 +548,7 @@ tree = ewl_widget_name_find("unit_test_tree"); ewl_container_reset(EWL_CONTAINER(tree)); - test = ewl_widget_data_get(w, "test"); + test = current_test; if ((!test) || (!test->unit_tests)) return; for (i = 0; test->unit_tests[i].func; i++) @@ -561,6 +561,7 @@ if (unit_test_timer) { ecore_timer_del(unit_test_timer); + unit_test_timer = NULL; current_unit_test = 0; } ------------------------------------------------------- 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