Subject: Re: [ruby-ffi] ANN ffi-bit_masks |
From: Matijs van Zuijlen |
Date: 9/2/13 12:57 AM |
To: ruby-ffi@googlegroups.com |
On 01/09/13 02:44, postmodern wrote:
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 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:
https://github.com/postmodern/ffi-bit_masks#readme Now I'm wondering what a FFI plugin for struct bit-fields might look like?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.Does this mean this plugin will work for function arguments but not for struct fields?
-- Matijs