Closed jordo closed 5 years ago
What is the #include <stdbool.h>
for? This defines bool
in C and should have no effect in C++ mode. I think it would be cleaner to either #include <stdbool.h>
in C mode and just use bool
everywhere (may break old C code, but is probably fine) or define an OBJC_BOOL
macro that is either bool
or _Bool
depending on whether we're in C or C++ mode.
oops I thought i have taken that out before the pull req, I can remove. Just using bool does break C code in other libraries (dispatch) for example. But ya, agreed OBJC_BOOL would be cleaner and I can guard it, as I wasn't sure if OBJC_BOOL could be defined on some other lib or something.
_Bool isn't defined when compiling from (.mm) objc++ files.