On Fri, 11 Nov 2011 22:23:35 +0100 (CET) Vincent Torri <vto...@univ-evry.fr> said:
> > > On Fri, 11 Nov 2011, Kim Woelders wrote: > > > On Fri, 11 Nov 2011 20:43:04 +0100, Enlightenment SVN > > <no-re...@enlightenment.org> wrote: > > > >> Log: > >> Ecore_X: Fix array problem for 64-bit (unsigned long vs unsigned int). > >> Thanks vtorri ;) > >> > >> Author: devilhorns > >> Date: 2011-11-11 11:43:04 -0800 (Fri, 11 Nov 2011) > >> New Revision: 65076 > >> Trac: http://trac.enlightenment.org/e/changeset/65076 > >> > >> Modified: > >> trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c > >> > >> Modified: trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c > >> =================================================================== > >> --- trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c > >> 2011-11-11 19:12:36 UTC (rev 65075) > >> +++ trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c > >> 2011-11-11 19:43:04 UTC (rev 65076) > >> @@ -131,7 +131,7 @@ > >> return -1; > >> } > >> for (i = 0; i < num_ret; i++) > >> - val[i] = ((unsigned long *)prop_ret)[i]; > >> + val[i] = ((unsigned int *)prop_ret)[i]; > >> num = num_ret; > >> *plst = val; > >> } > >> > > This "fix" is incorrect - man XGetWindowProperty. > > then val is wrong no it's not. leave it alone. leave it as it was. it was that way because longs tend to change between 32 and 64bits. ints tend to stay 32bits. yes we can have arguments over some architectures where int variest between 16 and 32bits, and some where long is always 32bits. reality is that on the architectures we work on/support (linux/the vast majority of unixes/mingw32 etc) int == 32bit, long == 32/64 bit. X11 protocol specifies that the 32bit cardinal IS 32bits. its not related to size of long. xlib used long because way back in those horrible 1980's sometimes ints were 16bit and thus you lost half your bits... -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel