diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-03 17:41:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-03 17:41:56 +0800 |
commit | 23b01e07a92ed92a40b3ee8dbdcf03174dc82db5 (patch) | |
tree | b6b2cafa2dcf23c64c6bfa8f2a1eff0947398a9f /meta/template/ffi.lua | |
parent | 7b76328600dd9bc5206f38a549da9e4f99c9ff84 (diff) | |
download | lua-language-server-23b01e07a92ed92a40b3ee8dbdcf03174dc82db5.zip |
add mark `---@nodiscard`
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 |