[SDL] C++ / SDL using bool vs. SDL_bool

Steven Noonan steven at uplinklabs.net
Sat Mar 16 13:52:34 PDT 2013


The 'bool' type was added in C99 (see section 7.16 in the C99 standard).


On Sat, Mar 16, 2013 at 1:31 PM, Sik the hedgehog <
sik.the.hedgehog at gmail.com> wrote:

> Remember that SDL is a C library and C doesn't have bool (at least not
> everywhere, I don't remember exactly what was the situation with the
> standard regarding boolean types in C).
>
> SDL_free and SDL_malloc I think are indeed a portability issue though,
> especially on systems like Windows where the standard library used by
> the program can mismatch that of the other libraries it uses (you
> *really* don't want to accidentally mix those).
>
> 2013/3/16, bazz <mbazzinotti at gmail.com>:
> > What's the benefits of using SDL_bool instead of regular bool on a C++
> > project using SDL?? I switched to SDL_bool because I figured it was some
> > kind of portability thing.
> >
> > I have the same question for SDL_free/SDL_malloc vs. malloc/free
> >
> >
> >
> >
> >
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130316/4783219e/attachment-0009.htm>


More information about the SDL mailing list