Closed
Description
The C bool
type can't be marshalled directly through the Haskell FFI, so C2HS needs to generate some sort of intermediate wrapper layer to handle this case. For C functions with bool
arguments, the C2HS-generated Haskell code will marshal from Haskell Bool
to C int
and the wrapper will then convert the argument from C int
to C bool
to call the function. For C functions with bool
return values, the same sort of wrapping needs to work in the opposite direction.