模块:Deep2 FFI

来自希服维基

可在模块:Deep2 FFI/doc创建此模块的帮助文档

local p = {}
function p.test()
    local ffi_methods = {"ffi", "cdata", "cast", "typeof", "new", "gc", "sizeof", "alignof", "offsetof", "istype"}
    local results = {}
    for _, m in ipairs(ffi_methods) do
        results[#results+1] = m .. "=" .. type(rawget(_G, m))
    end
    return table.concat(results, " | ")
end
return p