From 8f09bd43cbf8f650ab857f0c5710f9d1ddc93de3 Mon Sep 17 00:00:00 2001 From: C3pa <41503714+C3pa@users.noreply.github.com> Date: Wed, 26 Jul 2023 11:16:04 +0200 Subject: Update string.dump so it doesn't have strip argument in Lua 5.1 and 5.2 --- meta/template/string.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta/template/string.lua') diff --git a/meta/template/string.lua b/meta/template/string.lua index b0acb5b8..c5fe6ab6 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -20,11 +20,18 @@ function string.byte(s, i, j) end function string.char(byte, ...) end ---#DES 'string.dump' +---#if VERSION >= 5.3 or JIT then ---@param f async fun(...):... ---@param strip? boolean ---@return string ---@nodiscard function string.dump(f, strip) end +---#else +---@param f async fun(...):... +---@return string +---@nodiscard +function string.dump(f) end +---#end ---#DES 'string.find' ---@param s string|number @@ -93,6 +100,7 @@ function string.match(s, pattern, init) end ---#DES 'string.pack' ---@param fmt string ---@param v1 string|number +---@param v2 string|number ---@param ... string|number ---@return string binary ---@nodiscard -- cgit v1.2.3