summaryrefslogtreecommitdiff
path: root/core/src/lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-01 21:02:03 +0800
committerGitHub <[email protected]>2026-04-01 21:02:03 +0800
commit39fd35ea9d5d14079e4669b85423d488c9097cd4 (patch)
tree7d4452174422931fe8a56f49b2d349b4b7cc90b3 /core/src/lua
parent75b084fa57f2fe00f369d9cac3878c03da43a68a (diff)
parentc63ac2d50545f2f58872c5be9a46d8fb5b3e8016 (diff)
Merge pull request #7437 from xmake-io/lua55
update to lua5.5
Diffstat (limited to 'core/src/lua')
m---------core/src/lua/lua0
-rw-r--r--core/src/lua/xmake.lua8
-rwxr-xr-xcore/src/lua/xmake.sh4
3 files changed, 10 insertions, 2 deletions
diff --git a/core/src/lua/lua b/core/src/lua/lua
-Subproject 1ab3208a1fceb12fca8f24ba57d6e13c5bff15e
+Subproject a5522f06d2679b8f18534fd6a9968f7eb539dc3
diff --git a/core/src/lua/xmake.lua b/core/src/lua/xmake.lua
index 006480397..d732b89fb 100644
--- a/core/src/lua/xmake.lua
+++ b/core/src/lua/xmake.lua
@@ -14,13 +14,19 @@ target("lua")
add_includedirs("lua", {public = true})
-- add the common source files
- add_files("lua/*.c|lua.c|onelua.c|loslib.c")
+ add_files("lua/*.c|lua.c|onelua.c|loslib.c|lparser.c")
+
+ -- allow reassignment of for-loop control variables (lua 5.4 compatible)
+ add_files("lua/lparser.c", {rules = "utils.replace", replaces = {
+ {"RDKCONST%);", "VDKREG);"},
+ }})
if not is_plat("iphoneos") then
add_files("lua/loslib.c")
end
-- add definitions
add_defines("LUA_COMPAT_5_1", "LUA_COMPAT_5_2", "LUA_COMPAT_5_3", {public = true})
+
if is_plat("windows", "mingw") then
-- it has been defined in luaconf.h
--add_defines("LUA_USE_WINDOWS")
diff --git a/core/src/lua/xmake.sh b/core/src/lua/xmake.sh
index 59eff5dd3..754cbcdb3 100755
--- a/core/src/lua/xmake.sh
+++ b/core/src/lua/xmake.sh
@@ -30,7 +30,8 @@ target "lua"
add_files "lua/lobject.c"
add_files "lua/lopcodes.c"
add_files "lua/loslib.c"
- add_files "lua/lparser.c"
+ # allow reassignment of for-loop control variables (lua 5.4 compatible)
+ add_files "lua/lparser.c" "{replace = {RDKCONST);, VDKREG);}}"
add_files "lua/lstate.c"
add_files "lua/lstring.c"
add_files "lua/lstrlib.c"
@@ -44,6 +45,7 @@ target "lua"
# add definitions
add_defines "LUA_COMPAT_5_1" "LUA_COMPAT_5_2" "LUA_COMPAT_5_3" "{public}"
+
if is_plat "mingw"; then true
# it has been defined in luaconf.h
#add_defines "LUA_USE_WINDOWS"