Among other ways to implement the bool type in C (ex: typedef, #define, more here: https://stackoverflow.com/a/1921557), using stdbool.h seems be the safest option.
We should start using this bool type across the Runtime repo and use it where applicable in the current code. An exception to using stdbool.h is for boolean values that are size-sensitive. For example, the param_val_t union should still use uint8_t for boolean values because we encode/decode booleans as 1-byte values in the lowcar protocol.
Among other ways to implement the
bool
type in C (ex:typedef
,#define
, more here: https://stackoverflow.com/a/1921557), usingstdbool.h
seems be the safest option.We should start using this
bool
type across the Runtime repo and use it where applicable in the current code. An exception to usingstdbool.h
is for boolean values that are size-sensitive. For example, theparam_val_t
union should still useuint8_t
for boolean values because we encode/decode booleans as 1-byte values in the lowcar protocol.