Enlightenment CVS committal
Author : englebass
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e.h e_actions.c
Log Message:
Add macro to free lists.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- e.h 31 Jul 2007 15:00:22 -0000 1.70
+++ e.h 15 Aug 2007 05:48:47 -0000 1.71
@@ -119,6 +119,22 @@
#define E_NEW(s, n) (s *)calloc(n, sizeof(s))
#define E_NEW_BIG(s, n) (s *)malloc(n * sizeof(s))
#define E_FREE(p) do { if (p) {free(p); p = NULL;} } while (0)
+#define E_FREE_LIST(list, free) \
+ do \
+ { \
+ if (list) \
+ { \
+ Evas_List *tmp; \
+ tmp = list; \
+ list = NULL; \
+ while (tmp) \
+ { \
+ free(tmp->data); \
+ tmp = evas_list_remove_list(tmp, tmp); \
+ } \
+ } \
+ } \
+ while (0)
#define E_CLAMP(x, min, max) (x < min ? min : (x > max ? max : x))
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -3 -r1.105 -r1.106
--- e_actions.c 5 Aug 2007 04:41:55 -0000 1.105
+++ e_actions.c 15 Aug 2007 05:48:47 -0000 1.106
@@ -2206,20 +2206,12 @@
EAPI int
e_actions_shutdown(void)
{
- Evas_List *l;
-
e_action_predef_name_all_del();
action_names = evas_list_free(action_names);
evas_hash_free(actions);
actions = NULL;
- l = action_list;
- action_list = NULL;
- while (l)
- {
- e_object_del(E_OBJECT(l->data));
- l = evas_list_remove_list(l, l);
- }
+ E_FREE_LIST(action_list, e_object_del);
return 1;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs