On Wed, 19 Aug 2009, Cedric BAIL wrote:
> On Wed, Aug 19, 2009 at 12:04 PM, Vincent Torri<[email protected]> wrote: >> On Wed, 19 Aug 2009, Cedric BAIL wrote: >>> On Wed, Aug 19, 2009 at 10:40 AM, Vincent Torri<[email protected]> >>> wrote: >>>> >>>> On Wed, 19 Aug 2009, Vincent Torri wrote: >>>>> >>>>> Hey, >>>>> >>>>> in eina_fixed_bitmap.c, lines 68, 88 and 160, offsets are computed and >>>>> stored in an int. But, if I'm not mistaken, on 64 bits arch, offsets are >>>>> 64 bits long. >>>>> >>>>> Shouldn't we store them in long instead of int ? >>>> >>>> and technically speaking, we should cast to char * (it seems that, for >>>> gcc, sizeof(void) == 1) >>> >>> And sizeof(void*) ? :-) >> >> if you have : >> >> type *a = ... >> type *b = ... >> >> a - b is equal to (the address of a - the address of b) / sizeof (type) >> >> and not >> >> (the address of a - the address of b) / sizeof (type *) > > Does your compile handle void* arithmetic or not ? I guess your are > porting to some kind of strange compiler that don't support pointer > arithmetic with void* ? I am right ? it supports of course pointer arithmetic, but i think that you don't understand the problem, or you didn't read carefully what i just wrote above. You MUST know the size of 'type'. gcc is stating that void is a type of size 1, it's a gcc feature that is specific to it. suncc does not state that (size of void is undefined in the standard). Vincent ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
