On Thu, Dec 10, 2009 at 09:22:00AM -0800, Marvin Humphrey wrote:
> Great, I'll go work on the following couple of things today:
>
> * Finish phase 1 of the switchover from Boilerplater to Clownfish, so that
> we can eliminate trunk/boilerplater and use only trunk/clownfish.
> * Mod Clownfish to accept the new integer types.
Done.
I didn't include everything from stdint.h (e.g. no int_fast32_t, no
int_least32_t, no intmax_t), because it's not clear that Clownfish ought to
support all that. Just the following for now:
int8_t
int16_t
int32_t
int64_t
uint8_t
uint16_t
uint32_t
uint64_t
Those will allow us to eliminate all the chy int types except for bool_t,
which we'll replace with "bool". For "bool", we could use a three-part probe:
If the C99 header stdbool.h is available, we pound-include it in
charmony.h.
Else if the macro "__cplusplus" is defined, then we just use C++'s
built-in bool type.
Else we typedef "bool" to int and conditionally define "true" and "false",
just like we're doing now for chy_bool_t.
I'm not sure about that third branch, though, because it could potentially
conflict with somebody else typedef-ing bool to "char". "chy_bool_t" was
safe to muck with, but "bool" is not.
So, probably the best move is to just omit the third branch, making either
stdbool.h or C++ a prerequisite for Lucy.
Marvin Humphrey