diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/libs/@lua/debug.lni | 8 | ||||
-rw-r--r-- | server/locale/en-US/libs/@lua/debug.lni | 7 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/@lua/debug.lni | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/server/libs/@lua/debug.lni b/server/libs/@lua/debug.lni index 63124ff8..a7739993 100644 --- a/server/libs/@lua/debug.lni +++ b/server/libs/@lua/debug.lni @@ -152,6 +152,14 @@ type = 'any' `````````` type = 'boolean' +[setCstacklimit] +version = 'Lua 5.4' +[[.args]] +name = 'limit' +type = 'integer' +[[.returns]] +type = {'interger', 'boolean'} + [setfenv] version = {'Lua 5.1', 'LuaJIT'} [[.args]] diff --git a/server/locale/en-US/libs/@lua/debug.lni b/server/locale/en-US/libs/@lua/debug.lni index 8ab9d4f1..44d5317f 100644 --- a/server/locale/en-US/libs/@lua/debug.lni +++ b/server/locale/en-US/libs/@lua/debug.lni @@ -94,6 +94,13 @@ to the userdata `u` plus a boolean, `false` if the userdata does not have that value. ]] +[setCstacklimit] +description = [[ +Sets a new limit for the C stack. This limit controls how deeply nested calls can go in Lua, with the intent of avoiding a stack overflow. + +In case of success, this function returns the old limit. In case of error, it returns `false`. +]] + [setfenv] description = 'Sets the environment of the given `object` to the given `table` .' diff --git a/server/locale/zh-CN/libs/@lua/debug.lni b/server/locale/zh-CN/libs/@lua/debug.lni index 0725ef24..0ed9e219 100644 --- a/server/locale/zh-CN/libs/@lua/debug.lni +++ b/server/locale/zh-CN/libs/@lua/debug.lni @@ -90,6 +90,13 @@ description = '返回关联在 `u` 上的 `Lua` 值。' ["getuservalue Lua 5.4"] description = '返回关联在 `u` 上的第 `n` 个 `Lua` 值,以及一个布尔,`false`表示值不存在。' +[setCstacklimit] +description = [[ +设置新的C栈限制。该限制控制Lua中嵌套调用的深度,以避免堆栈溢出。 + +如果设置成功,该函数返回之前的限制;否则返回`false`。 +]] + [setfenv] description = '将 `table` 设置为 `object` 的环境。' |