-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nicolas Kaiser wrote: > This patch adds support for the compiler built-in Boolean type > to GLboolean and the "boolean" type in gallium > by bringing them in line with the "bool" type in stdbool.h. > > Signed-off-by: Nicolas Kaiser <ni...@nikai.net> > --- > include/GL/gl.h | 7 ++++--- > include/GLES/gl.h | 7 ++++--- > include/GLES2/gl2.h | 7 ++++--- > src/gallium/include/pipe/p_compiler.h | 2 +- > 4 files changed, 13 insertions(+), 10 deletions(-) > > diff --git a/include/GL/gl.h b/include/GL/gl.h > index 8e5f138..2d66053 100644 > --- a/include/GL/gl.h > +++ b/include/GL/gl.h > @@ -149,11 +149,12 @@ extern "C" { > #define GL_ARB_imaging 1 > > > +#include <stdbool.h>
In spite of my dislike of the GL types, this doesn't seem useful. Moreover, the GLES headers come from Khronos and we don't get to change those. [snip] > diff --git a/src/gallium/include/pipe/p_compiler.h > b/src/gallium/include/pipe/p_compiler.h > index 3d6b5b5..b12399b 100644 > --- a/src/gallium/include/pipe/p_compiler.h > +++ b/src/gallium/include/pipe/p_compiler.h > @@ -72,7 +72,7 @@ typedef unsigned short ushort; > #endif > typedef unsigned char ubyte; > > -typedef unsigned char boolean; > +typedef bool boolean; > #ifndef TRUE > #define TRUE true > #endif Why not just stop using boolean in favor of bool? The ISO C committee was kind enough to define types that work everywhere (provide you have the appropriate header files). Defining new names for those types is tantamount to code obfuscation. Don't even get me started about ubyte, ushort, and friends. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAky3dzEACgkQX1gOwKyEAw+WqgCZARnHt2IOatxuISS0h49y7X6D CJMAnjdLzU/Qe4VolXldJ8SX6baOVwx8 =LZDT -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev