diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | meta/template/debug.lua | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index ac19bfeb..473a9da6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 2.3.0 +* `FIX` `debug.getuservalue` and `debug.setuservalue` should not exist in `Lua 5.1` + ## 2.2.3 `2021-7-9` * `CHG` improve `auto require` diff --git a/meta/template/debug.lua b/meta/template/debug.lua index 26b6049e..67da98b1 100644 --- a/meta/template/debug.lua +++ b/meta/template/debug.lua @@ -109,7 +109,7 @@ function debug.getupvalue(f, up) end ---@return any ---@return boolean function debug.getuservalue(u, n) end ----#else +---#elseif VERSION >= 5.2 then ---#DES 'debug.getuservalue<5.3' ---@param u userdata ---@return any @@ -173,7 +173,7 @@ function debug.setupvalue(f, up, value) end ---@param n integer ---@return userdata udata function debug.setuservalue(udata, value, n) end ----#else +---#elseif VERSION >= 5.2 then ---#DES 'debug.setuservalue<5.3' ---@param udata userdata ---@param value any |