lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, 16 Aug 2011 17:58:50 +0200, Pierre Chapuis wrote:

Apparently the function that sets a bit to 1 is skipped sometimes:

  local bit_set_1 = function(_bset,_byte,_bit)
    _bset[_byte] = bor(bset[_byte],bmask_1[_bit])

To be even clearer: I have confirmed that function is *called* as expected
(by adding debug traces to stderr inside it).
It just doesn't do what it is expected to do, ie. set a bit to 1 in a
FFI char* structure.

Pierre 'catwell' Chapuis