Re: Common FFI declarations

  • From: Duncan Cross <duncan.cross@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 9 May 2012 12:26:19 +0100

On Tue, May 8, 2012 at 6:04 PM, Mike Pall <mike-1205@xxxxxxxxxx> wrote:
> Duncan Cross wrote:
>> This reminds me of something: in the WIN32 API, and a few other APIs,
>> the boolean type ("BOOL" in WIN32's case) is unfortunately not the
>> same bit-width as the C99/C++ 'bool' type, so you have to use an
>> integer type instead.
>
> $ git log -1 | tail -1
>    FFI: Allow 'typedef _Bool int BOOL;' to make Windows users happy.
>
> '_Bool unsigned int' works too. But no other combinations.

Great stuff! Thank you.

-Duncan

Other related posts: