forked from enlightenment/enlightenment
parent
285c459983
commit
67ee15f072
16
src/bin/e.h
16
src/bin/e.h
|
@ -119,6 +119,22 @@ typedef struct _E_Rect E_Rect;
|
|||
#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))
|
||||
|
||||
|
|
|
@ -2206,20 +2206,12 @@ e_actions_init(void)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue