Let's say that I have the following LuaJIT code:
local ffi = require "ffi"
ffi.cdef[[
typedef struct { int num; } container;
]]
local a = ffi.new("container")
a.num = 10
library.doSomethingTo(a)
and let's say that library.doSomethingTo
is defined by the following C code:
int doSomethingDo(lua_State *L) {
//code here
}
what code would need to go at //code here
in order to make library.doSomethingTo(a)
print 10?