Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        ecore_x_window_prop.c 


Log Message:



avoid the malloc / copy routine when int's and longs are the same size


===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- ecore_x_window_prop.c       6 Sep 2005 03:43:02 -0000       1.76
+++ ecore_x_window_prop.c       7 Sep 2005 22:16:49 -0000       1.77
@@ -22,6 +22,9 @@
    long               *v2;
    unsigned int        i;
 
+#if SIZEOF_INT == SIZEOF_LONG
+   _ATOM_SET_CARD32(win, atom, val, num);
+#else
    v2 = malloc(num * sizeof(long));
    if (!v2)
       return;
@@ -29,6 +32,8 @@
       v2[i] = val[i];
    _ATOM_SET_CARD32(win, atom, v2, num);
    free(v2);
+#endif
+
 }
 
 /*




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to