Discussion:
ANN ffi-bit_masks
postmodern
2013-08-28 10:15:00 UTC
Permalink
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?
--
Blog: http://postmodern.github.com/
GitHub: https://github.com/postmodern
Twitter: @postmodern_mod3
PGP: 0xB9515E77
Matijs van Zuijlen
2013-08-31 11:05:02 UTC
Permalink
Post by postmodern
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?
--
Matijs
postmodern
2013-09-01 00:44:42 UTC
Permalink
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|
Post by Matijs van Zuijlen
Post by postmodern
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
Matijs van Zuijlen
2013-09-02 05:57:02 UTC
Permalink
The library defines a typedef to the new BitMask Data Converter. So anywhere you
can use a typedef, you can use ffi-bit_masks.
Excellent. I've been waiting for bitmasks for a long time, so I'll be trying out
ffi-bit_masks in my own gem soon.
I'm thinking about forking the library and writing a plugin specifically for
|layout :foo, :uint,
:x, 1,
:y, 3,
:z, 2|
Post by Matijs van Zuijlen
Post by postmodern
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?
--
Matijs
Loading...