Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_editable.c 


Log Message:
Less memory allocation.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_editable.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- e_editable.c        30 Sep 2006 10:16:23 -0000      1.16
+++ e_editable.c        5 Apr 2007 18:11:42 -0000       1.17
@@ -112,21 +112,18 @@
      return;
    if ((!category) || (!group))
      return;
+   obj_group = alloca(strlen(group) + strlen("/selection") + 1);
    
    /* Gets the theme for the text object */
-   obj_group = malloc(strlen(group) + strlen("/text") + 1);
    sprintf(obj_group, "%s/text", group);
    e_theme_edje_object_set(sd->text_object, category, obj_group);
-   free(obj_group);
    sd->average_char_w = -1;
    sd->average_char_h = -1;
    
    
    /* Gets the theme for the cursor */
-   obj_group = malloc(strlen(group) + strlen("/cursor") + 1);
    sprintf(obj_group, "%s/cursor", group);
    e_theme_edje_object_set(sd->cursor_object, category, obj_group);
-   free(obj_group);
    
    edje_object_size_min_get(sd->cursor_object, &sd->cursor_width, NULL);
    if (sd->cursor_width < 1)
@@ -134,10 +131,8 @@
    
    
    /* Gets the theme for the selection */
-   obj_group = malloc(strlen(group) + strlen("/selection") + 1);
    sprintf(obj_group, "%s/selection", group);
    e_theme_edje_object_set(sd->selection_object, category, obj_group);
-   free(obj_group);
    
    data = edje_object_data_get(sd->selection_object, "on_foreground");
    if ((data) && (strcmp(data, "1") == 0))



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to