From 87e2b7c579d49bd20b69304b38c285989369967a Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 31 Mar 2026 00:48:06 +0800 Subject: allow reassignment of for-loop control variables --- core/src/lua/xmake.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/src/lua/xmake.lua') diff --git a/core/src/lua/xmake.lua b/core/src/lua/xmake.lua index 006480397..6a3fa78a6 100644 --- a/core/src/lua/xmake.lua +++ b/core/src/lua/xmake.lua @@ -21,6 +21,11 @@ target("lua") -- add definitions add_defines("LUA_COMPAT_5_1", "LUA_COMPAT_5_2", "LUA_COMPAT_5_3", {public = true}) + + -- allow reassignment of for-loop control variables (lua 5.4 compatible) + add_undefines("RDKCONST") + add_defines("RDKCONST=0") + if is_plat("windows", "mingw") then -- it has been defined in luaconf.h --add_defines("LUA_USE_WINDOWS") -- cgit v1.3.1 From 0dddc81ee9a97221f2e20851ac133cc2a105125b Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 31 Mar 2026 00:51:17 +0800 Subject: revert rdkconst --- core/src/lua/xmake.lua | 4 ---- core/src/lua/xmake.sh | 4 ---- 2 files changed, 8 deletions(-) (limited to 'core/src/lua/xmake.lua') diff --git a/core/src/lua/xmake.lua b/core/src/lua/xmake.lua index 6a3fa78a6..39d7b0baa 100644 --- a/core/src/lua/xmake.lua +++ b/core/src/lua/xmake.lua @@ -22,10 +22,6 @@ target("lua") -- add definitions add_defines("LUA_COMPAT_5_1", "LUA_COMPAT_5_2", "LUA_COMPAT_5_3", {public = true}) - -- allow reassignment of for-loop control variables (lua 5.4 compatible) - add_undefines("RDKCONST") - add_defines("RDKCONST=0") - 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 cfffd000c..6c504c3d0 100755 --- a/core/src/lua/xmake.sh +++ b/core/src/lua/xmake.sh @@ -45,10 +45,6 @@ target "lua" # add definitions add_defines "LUA_COMPAT_5_1" "LUA_COMPAT_5_2" "LUA_COMPAT_5_3" "{public}" - # allow reassignment of for-loop control variables (lua 5.4 compatible) - add_undefines "RDKCONST" - add_defines "RDKCONST=0" - if is_plat "mingw"; then true # it has been defined in luaconf.h #add_defines "LUA_USE_WINDOWS" -- cgit v1.3.1 From 9ed41d0ba846861f13ac5aa3fd35fa2ef82bd8c9 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 31 Mar 2026 00:51:31 +0800 Subject: revert rdkconst --- core/src/lua/xmake.lua | 4 ++++ core/src/lua/xmake.sh | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'core/src/lua/xmake.lua') diff --git a/core/src/lua/xmake.lua b/core/src/lua/xmake.lua index 39d7b0baa..6a3fa78a6 100644 --- a/core/src/lua/xmake.lua +++ b/core/src/lua/xmake.lua @@ -22,6 +22,10 @@ target("lua") -- add definitions add_defines("LUA_COMPAT_5_1", "LUA_COMPAT_5_2", "LUA_COMPAT_5_3", {public = true}) + -- allow reassignment of for-loop control variables (lua 5.4 compatible) + add_undefines("RDKCONST") + add_defines("RDKCONST=0") + 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 6c504c3d0..cfffd000c 100755 --- a/core/src/lua/xmake.sh +++ b/core/src/lua/xmake.sh @@ -45,6 +45,10 @@ target "lua" # add definitions add_defines "LUA_COMPAT_5_1" "LUA_COMPAT_5_2" "LUA_COMPAT_5_3" "{public}" + # allow reassignment of for-loop control variables (lua 5.4 compatible) + add_undefines "RDKCONST" + add_defines "RDKCONST=0" + if is_plat "mingw"; then true # it has been defined in luaconf.h #add_defines "LUA_USE_WINDOWS" -- cgit v1.3.1 From 1c6ad67e90e5035e49c0a73d232d74346a4072b1 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 31 Mar 2026 22:43:31 +0800 Subject: revert rdkconst --- core/src/lua/xmake.lua | 4 ---- core/src/lua/xmake.sh | 4 ---- 2 files changed, 8 deletions(-) (limited to 'core/src/lua/xmake.lua') diff --git a/core/src/lua/xmake.lua b/core/src/lua/xmake.lua index 6a3fa78a6..39d7b0baa 100644 --- a/core/src/lua/xmake.lua +++ b/core/src/lua/xmake.lua @@ -22,10 +22,6 @@ target("lua") -- add definitions add_defines("LUA_COMPAT_5_1", "LUA_COMPAT_5_2", "LUA_COMPAT_5_3", {public = true}) - -- allow reassignment of for-loop control variables (lua 5.4 compatible) - add_undefines("RDKCONST") - add_defines("RDKCONST=0") - 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 cfffd000c..6c504c3d0 100755 --- a/core/src/lua/xmake.sh +++ b/core/src/lua/xmake.sh @@ -45,10 +45,6 @@ target "lua" # add definitions add_defines "LUA_COMPAT_5_1" "LUA_COMPAT_5_2" "LUA_COMPAT_5_3" "{public}" - # allow reassignment of for-loop control variables (lua 5.4 compatible) - add_undefines "RDKCONST" - add_defines "RDKCONST=0" - if is_plat "mingw"; then true # it has been defined in luaconf.h #add_defines "LUA_USE_WINDOWS" -- cgit v1.3.1 From c63ac2d50545f2f58872c5be9a46d8fb5b3e8016 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 2 Apr 2026 00:01:02 +0800 Subject: fix lua55 limit --- core/src/lua/xmake.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/src/lua/xmake.lua') diff --git a/core/src/lua/xmake.lua b/core/src/lua/xmake.lua index 39d7b0baa..d732b89fb 100644 --- a/core/src/lua/xmake.lua +++ b/core/src/lua/xmake.lua @@ -14,7 +14,12 @@ 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 -- cgit v1.3.1