[PATCH weston] cosmetic: replace boolean function return values with bool
spitzak at gmail.com
Tue Nov 4 15:26:30 PST 2014
On 11/04/2014 02:48 AM, Pekka Paalanen wrote:
> I kind of wonder what including stdbool.h does to C++ sources using
> compositor.h, but if that breaks, we'll hear about it.
Looks like there are attempts to make this work in gcc at least. The
result is that the C++ bool, true, and false are used.
If I understand it right, doing "#include <stdbool.h>" in C++ will get
That file then includes /usr/include/c++/4.6/tr1/cstdbool
That file then includes /usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdbool.h
That file (which would have worked if included directly instead of those
C++ wrappers) then defines bool=bool, true=true, false=false, and
_Bool=bool. I guess the reason it does this is so code that does "#ifdef
bool" will work? I think that is overkill and it should have just done
Typically messy but functional.
More information about the wayland-devel