cffi-lua icon indicating copy to clipboard operation
cffi-lua copied to clipboard

cannot convert 'table' to 'struct MenuItem'

Open gynt opened this issue 9 months ago • 0 comments

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.

gynt avatar Apr 17 '25 11:04 gynt