Enlightenment CVS committal
Author : e-taro
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_pointer.c
Log Message:
Free data when pointer info is popped off the stack (and a little
simplification)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_pointer.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- e_pointer.c 7 Jan 2006 10:39:45 -0000 1.23
+++ e_pointer.c 25 Feb 2006 06:28:50 -0000 1.24
@@ -22,6 +22,7 @@
static void _e_pointer_cb_move(void *data, Evas *e __UNUSED__, Evas_Object
*obj __UNUSED__, void *event_info);
static void _e_pointer_free(E_Pointer *p);
+static void _e_pointer_stack_free(E_Pointer_Stack *elem);
static int _e_pointer_type_set(E_Pointer *p, const char *type);
/* externally accessible functions */
@@ -208,18 +209,15 @@
Evas_List *l;
E_Pointer_Stack *stack;
- for (l = p->stack; l;)
+ for (l = p->stack; l; l = l->next)
{
- Evas_List *l2;
-
stack = l->data;
- l2 = l;
- l = l->next;
if ((stack->obj == obj) &&
((!type) || (!strcmp(stack->type, type))))
{
- p->stack = evas_list_remove_list(p->stack, l2);
+ _e_pointer_stack_free(stack);
+ p->stack = evas_list_remove_list(p->stack, l);
if (type) break;
}
}
@@ -315,12 +313,7 @@
while (p->stack)
{
- E_Pointer_Stack *stack;
-
- stack = p->stack->data;
- if (stack->type) evas_stringshare_del(stack->type);
- free(stack);
-
+ _e_pointer_stack_free(p->stack->data);
p->stack = evas_list_remove_list(p->stack, p->stack);
}
@@ -328,6 +321,14 @@
free(p);
}
+static void
+_e_pointer_stack_free(E_Pointer_Stack *elem)
+{
+ if (elem->type)
+ evas_stringshare_del(elem->type);
+ free(elem);
+}
+
static int
_e_pointer_type_set(E_Pointer *p, const char *type)
{
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs