Subject:
Re: [ruby-ffi] ANN ffi-bit_masks
From:
postmodern
Date:
8/31/13 7:44 PM
To:
ruby-ffi@googlegroups.com

The library defines a typedef to the new BitMask Data Converter. So anywhere you can use a typedef, you can use ffi-bit_masks.

I'm thinking about forking the library and writing a plugin specifically for Struct bit-fields, but I want to use sexy syntax:
layout :foo, :uint,
       :x,    1,
       :y,    3,
       :z,    2
On 08/31/2013 04:05 AM, Matijs van Zuijlen wrote:
On 28/08/13 12:15, postmodern wrote:
I finally got around to finishing my FFI plugin for handling bit-masked
function arguments. Much thanks to Wayne Meissner for explaining the
DataConverter API.
https://github.com/postmodern/ffi-bit_masks#readme

Now I'm wondering what a FFI plugin for struct bit-fields might look like?

Does this mean this plugin will work for function arguments but not for struct
fields?



-- 
Blog: http://postmodern.github.com/
GitHub: https://github.com/postmodern
Twitter: @postmodern_mod3
PGP: 0xB9515E77