ffi.cast bad argument #1 to 'cast' (invalid C type)

  • From: Victor Bombi <sonoro@xxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 20 Jan 2020 09:47:38 +0100 (CET)

Hello,


local buf = ffi.new"float[10][3]"
local buf2 = ffi.cast("float*",buf)
local buf3 = ffi.cast("float[10][3]",buf2)


The third cast says: bad argument #1 to 'cast' (invalid C type)

How can the last cast be done?


Thanks

victor bombi

Other related posts: