diff options
Diffstat (limited to 'meta/template/ffi.lua')
-rw-r--r-- | meta/template/ffi.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/template/ffi.lua b/meta/template/ffi.lua index 97dd4bc2..833232d4 100644 --- a/meta/template/ffi.lua +++ b/meta/template/ffi.lua @@ -26,21 +26,24 @@ function ffi.cdef(def) end ---@param name string ---@param global? boolean ---@return ffi.namespace* clib +---@nodiscard function ffi.load(name, global) end ---@param ct ffi.ct* ---@param nelem? integer ---@param init? any ---@return ffi.cdata* cdata +---@nodiscard function ffi.new(ct, nelem, init, ...) end ---@param nelem? integer ---@param init? any ---@return ffi.cdata* cdata -function ctype(nelem, init, ...) end +function ffi.ctype(nelem, init, ...) end ---@param ct ffi.ct* ---@return ffi.ctype* ctype +---@nodiscard function ffi.typeof(ct) end ---@param ct ffi.ct* @@ -61,10 +64,12 @@ function ffi.gc(cdata, finalizer) end ---@param ct ffi.ct* ---@param nelem? integer ---@return integer|nil size +---@nodiscard function ffi.sizeof(ct, nelem) end ---@param ct ffi.ct* ---@return integer align +---@nodiscard function ffi.alignof(ct) end ---@param ct ffi.ct* @@ -72,15 +77,18 @@ function ffi.alignof(ct) end ---@return integer ofs ---@return integer? bpos ---@return integer? bsize +---@nodiscard function ffi.offsetof(ct, field) end ---@param ct ffi.ct* ---@param obj any ---@return boolean status +---@nodiscard function ffi.istype(ct, obj) end ---@param newerr? integer ---@return integer err +---@nodiscard function ffi.errno(newerr) end ---@param ptr any |