Re: [AD] Allegro 5 (4.9) data type

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


On Friday 22 August 2008, Peter Hull wrote:
> I agree with Peter on that one. I sometimes find myself writing code
> like (for example)
> if (value == GL_TRUE) return true;
> which is overkill I know but it seems like the most correct thing to do.
>
> We should make use of the C99 types (int32_t etc) from
> stdint.h/astdint.h though.

the problem there is one of our main platforms (MSVC) does not , and will 
likely never support C99.  So we have to try using them, and if that doesn't 
work, we have to duplicate them. So it can't depend directly on stdint.h or 
any other C99 feature.

> Would it be useful to add the int_fastN_t
> types as well?
>
> Pete
>
> On Fri, Aug 22, 2008 at 12:39 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > On 2008-08-22, Guillermo Martínez Jiménez <gmjimen@xxxxxxxxxx> wrote:
> >> Hello everybody.
> >>
> >> I've seen that Allegro 4.9 uses the standard C data types. Did you
> >> discuss about to redefine them as OpenGL does? You know, GLint,
> >> GLuint, GLbyte, etc. I know it would be a nightmare to change all
> >> declarations for all functions and structs, but I think the benefits
> >> would be greater, specially to port the library between different
> >> platforms (there are versions for the GP2X and Nintendo game consoles)
> >> and languages. Also the most important and powerful cross-platform
> >> libraries (OpenGL, GTK+, SDL...) do this so it must be discussed.
> >
> > I always *hate* when each library defines its own types, for whatever
> > reason.  Am I supposed to use those types or are they just
> > implementation details?  As a user of *two* libraries, whose types do I
> > adopt?  Is FooInt the same as BarInt?  Always?  Sometimes?
> >
> > Peter
> >
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > challenge Build the coolest Linux based applications with Moblin SDK &
> > win great prizes Grand prize is a trip for two to an Open Source event
> > anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > --
> > https://lists.sourceforge.net/lists/listinfo/alleg-developers
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




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