cffi-lua
cffi-lua copied to clipboard
cannot convert 'table' to 'struct MenuItem'
The following snippet does not work. MenuItem is a struct, menuItemType is a valid field. My goal is to initialize the struct array with a default value for menuItemType.
ffi.new(string.format("MenuItem[%s]", o.menuItemsCount), {[0] = {menuItemType = 0x66}})
This does work in LuaJIT's ffi.