forked from enlightenment/efl
avoid the malloc / copy routine when int's and longs are the same size
SVN revision: 16663
This commit is contained in:
parent
087319c5c0
commit
b1a0a81c7c
|
@ -22,6 +22,9 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
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 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
v2[i] = val[i];
|
||||
_ATOM_SET_CARD32(win, atom, v2, num);
|
||||
free(v2);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue