Description
To my surprise, on examing the assembly/C, I realise that a boolean
is stored as a value of either 0 or 1 in a byte, and is converted to/from 0/-1 when converting to/from a numerical type. This appears to mean it is exactly the same as C's _Bool
(or bool
with stdbool.h).
Therefore, why doesn't fbfrog convert _Bool
to boolean
? The fact that it instead translates to 'byte' breaks code such as while not WindowShouldClose()
(function returning a bool) from the raylib examples and all previous translations of those examples and headers into FB, so I feel I have no choice but to edit my new translation of raylib.bi to use boolean.
Boolean was only added in 2015, so I guess it was just never implemented.
I'm currently working on this, and have come across no problems so far.
The only concern is whether there's any case where this would break code using existing headers, if the headers are regenerated.