Boolean is also more prone to bugs. I've got this habit from C++, I usually convert int to bool by a simple assignment (without the "!= 0" part). That doesn't work with boolean defined as char, because the upper bits are always truncated.
Marek On Wed, Jun 8, 2011 at 4:54 PM, Jose Fonseca <jfons...@vmware.com> wrote: > Personally, I prefer the standard C bool type, given it's a) standard, b) > shorter. Furthermore Microsoft's windows.h already defines boolean: > > $ grep -r '\<boolean\>' /usr/i586-mingw32msvc/include/ > /usr/i586-mingw32msvc/include/rpcndr.h:typedef unsigned char boolean; > > which can create havoc depending on how the windows.h is included. > > I understand the gallium's naming conventing of taking the GL types such as > GLboolean and GLuint and stripping the GL prefix, but there are already too > many bool type definitions out there -- often incompatible ones (sometimes > int). > > So, I really see no point for boolean type other than consistency for sake of > it, and if we're really cleaning up the sources, I'd much rather do it on > opposite direction, i.e., s/\<boolean\>/bool/g. > > Anyway, this is probably something we might not achieve consensus, so no > biggie if we stick boolean as far as I'm concerned. > > Jose > > ----- Original Message ----- >> Module: Mesa >> Branch: master >> Commit: 5f2deba9f3f3f9230a9fdd2848e20c1e23e98b8f >> URL: >> >> http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f2deba9f3f3f9230a9fdd2848e20c1e23e98b8f >> >> Author: Brian Paul <bri...@vmware.com> >> Date: Wed Jun 8 08:05:40 2011 -0600 >> >> gallium: s/bool/boolean/ >> > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev