[SDL] SDL_bool

Olivier Delannoy olivier.delannoy at gmail.com
Tue Jul 11 03:06:26 PDT 2006


false/true are not a type as far as I know the code you suggest is invalid.

On 7/11/06, Roman Kyrylych <roman.kyrylych at gmail.com> wrote:
> Hi all!
>
> I'm wondering why SDL uses simple
>
> typedef enum SDL_bool {
>        SDL_FALSE = 0,
>        SDL_TRUE  = 1
> } SDL_bool;
>
> Maybe for better C++ interface it could use something like
>
> #ifdef __cplusplus
> typedef SDL_bool bool;
> typedef SDL_FALSE false;
> typedef SDL_TRUE true;
> #else
> typedef enum SDL_bool {
>        SDL_FALSE = 0,
>        SDL_TRUE  = 1
> } SDL_bool;
> #endif
>
> But I dont know, maybe there will be some binary incompatabilities
> then (on some compilers on some platforms)?
>
> --
> Roman Kyrylych (Роман Кирилич)
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>


More information about the SDL mailing list