Sdk: [ffi] Bool type

Created on 6 May 2019  路  5Comments  路  Source: dart-lang/sdk

Should we add a Bool type that corresponds to the Dart bool?

How should it behave when passed to C?

/cc @sjindel-google @mraleph

area-vm library-ffi

Most helpful comment

Any updates in this?

All 5 comments

Since C99, the C language has a bool type which we might want to support in dart:ffi.

/cc @mkustermann

Any updates in this?

There is any update on this? Have you any side-way to support c99 bool return types while we wait for this feature to be implemented?

Not yet. You can work around it with Int8 for now. Does that work for you?

Asking to google, I've found that it could be implemented as a uint8_t in some cases, but for me (gcc on linux) Int8 works like a charm! Thank you for your suggestion and the immediate response!
I hope you're all keeping well and safe

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ranquild picture ranquild  路  3Comments

sgrekhov picture sgrekhov  路  3Comments

xster picture xster  路  3Comments

DartBot picture DartBot  路  3Comments

matanlurey picture matanlurey  路  3Comments