I have a Lua function that I want to use as a callback from C. The C type of the callback includes a struct as argument. When I try to create this callback in LuaJIT, I get an error. For instance: ffi = require("ffi") ffi.cdef("typedef struct {} A;") ffi.cdef("typedef (*fn)(A);") function myfn(a) end result = ffi.cast("fn",myfn) -- cannot convert 'function' to 'void (*)()' Is this functionality not currently supported? Thanks, Zach