Re: [AD] allegro doesn't seem to be 64 bit clean.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> OK. But how should the following case from guiproc.c(d_text_list_proc) be
> handled?
>
> [d is DIALOG *]
>
> d->dp3 = (void *)((int)d->dp3 + 1);
>
> You get *two* warnings here because a pointer won't fit in an int and
> 'void *' is larger than int. I guess, following your reasoning, this
> should be changed to:
>
> d->dp3 = (void *)(long int)((long int)d->dp3 + 1);
>
> Right?

I guess so.

Btw, upon looking more closely at this stuff, it turned out that using 
'unsigned long' is actually the preferred way of dealing with the conversion 
(see for example include/allegro/internal/alconfig.h). Sorry for the 
confusion...

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/