Skip to content

Commit 00443e0

Browse files
carsakillerflrgh
andauthored
Replace old variable return syntax (#1540)
* fix: replace old variable return syntax #1539 * Update jit.status() Co-authored-by: Michael Martin <flrgh@protonmail.com>
1 parent 8365eec commit 00443e0

File tree

8 files changed

+16
-19
lines changed

8 files changed

+16
-19
lines changed

meta/3rd/OpenResty/library/ngx.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4382,7 +4382,7 @@ function ngx.resp.get_headers(max_headers, raw) end
43824382
---@param ... ngx.thread.arg
43834383
---@return boolean ok
43844384
---@return ngx.thread.arg? result_or_error
4385-
---@return ...
4385+
---@return any ...
43864386
function ngx.run_worker_thread(threadpool, module_name, func_name, arg1, arg2, ...)
43874387
end
43884388

meta/3rd/skynet/library/skynet.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ end
159159
---* 将 C 指针 或字符串转换成 Lua 数据
160160
---@param msg lightuserdata | string
161161
---@param sz? number
162-
---@return ...
162+
---@return any ...
163163
function skynet.unpack(msg, sz)
164164
end
165165

meta/template/basic.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ arg = {}
99
---@param v? T
1010
---@param message? any
1111
---@return T
12-
---@return ...
12+
---@return any ...
1313
function assert(v, message, ...) end
1414

1515
---@alias gcoptions
@@ -163,7 +163,7 @@ function pairs(t) end
163163
---@param arg1? any
164164
---@return boolean success
165165
---@return any result
166-
---@return ...
166+
---@return any ...
167167
function pcall(f, arg1, ...) end
168168

169169
---#DES 'print'
@@ -269,7 +269,7 @@ function warn(message, ...) end
269269
---@param err function
270270
---@return boolean success
271271
---@return any result
272-
---@return ...
272+
---@return any ...
273273
function xpcall(f, err) end
274274
---#else
275275
---#DES 'xpcall>5.2'
@@ -278,7 +278,7 @@ function xpcall(f, err) end
278278
---@param arg1? any
279279
---@return boolean success
280280
---@return any result
281-
---@return ...
281+
---@return any ...
282282
function xpcall(f, msgh, arg1, ...) end
283283
---#end
284284

meta/template/coroutine.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ function coroutine.close(co) end
3434
---@param co thread
3535
---@param val1? any
3636
---@return boolean success
37-
---@return any result
38-
---@return ...
37+
---@return any ...
3938
function coroutine.resume(co, val1, ...) end
4039

4140
---#DES 'coroutine.running'
@@ -62,7 +61,7 @@ function coroutine.wrap(f) end
6261

6362
---#DES 'coroutine.yield'
6463
---@async
65-
---@return ...
64+
---@return any ...
6665
function coroutine.yield(...) end
6766

6867
return coroutine

meta/template/io.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function io.popen(prog, mode) end
7272
---#DES 'io.read'
7373
---@param ... readmode
7474
---@return any
75-
---@return ...
75+
---@return any ...
7676
---@nodiscard
7777
function io.read(...) end
7878

@@ -135,7 +135,7 @@ function file:lines(...) end
135135
---#DES 'file:read'
136136
---@param ... readmode
137137
---@return any
138-
---@return ...
138+
---@return any ...
139139
---@nodiscard
140140
function file:read(...) end
141141

meta/template/jit.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function jit.off(func, recursive) end
2626
function jit.flush(func, recursive) end
2727

2828
---@return boolean status
29-
---@return ...
29+
---@return string ...
3030
---@nodiscard
3131
function jit.status() end
3232

meta/template/string.lua

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ string = {}
88
---@param s string
99
---@param i? integer
1010
---@param j? integer
11-
---@return integer
12-
---@return ...
11+
---@return integer ...
1312
---@nodiscard
1413
function string.byte(s, i, j) end
1514

1615
---#DES 'string.char'
1716
---@param byte integer
1817
---@param ... integer
1918
---@return string
20-
---@return ...
2119
---@nodiscard
2220
function string.char(byte, ...) end
2321

@@ -35,7 +33,7 @@ function string.dump(f, strip) end
3533
---@param plain? boolean
3634
---@return integer start
3735
---@return integer end
38-
---@return ... captured
36+
---@return string|integer ... captured
3937
---@nodiscard
4038
function string.find(s, pattern, init, plain) end
4139

@@ -87,7 +85,7 @@ function string.lower(s) end
8785
---@param s string
8886
---@param pattern string
8987
---@param init? integer
90-
---@return ... captured
88+
---@return string|integer|nil ...
9189
---@nodiscard
9290
function string.match(s, pattern, init) end
9391

@@ -143,7 +141,7 @@ function string.sub(s, i, j) end
143141
---@param fmt string
144142
---@param s string
145143
---@param pos? integer
146-
---@return ...
144+
---@return any ...
147145
---@return integer offset
148146
---@nodiscard
149147
function string.unpack(fmt, s, pos) end

script/utility.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ function switchMT:has(name)
730730
end
731731

732732
---@param name string
733-
---@return ...
733+
---@return any ...
734734
function switchMT:__call(name, ...)
735735
local callback = self.map[name] or self._default
736736
if not callback then

0 commit comments

Comments
 (0)