Skip to content

Commit 909d90d

Browse files
authored
Merge pull request #520 from adxeproject/lua-5.4
Use lua-5.4.3 as default plainlua version
2 parents aad17cb + 1ada732 commit 909d90d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+16319
-23483
lines changed

extensions/scripting/lua-bindings/script/framework/package_support.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ THE SOFTWARE.
2323
]]
2424

2525
-- Cocos2d-Lua core functions
26+
local unpack = table.unpack
2627
cc.loaded_packages = {}
2728
local loaded_packages = cc.loaded_packages
2829

extensions/scripting/lua-bindings/script/framework/transition.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ THE SOFTWARE.
2222
2323
]]
2424

25+
local unpack = table.unpack
2526
local transition = {}
2627

2728
local ACTION_EASING = {}

extensions/scripting/lua-bindings/script/init.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ THE SOFTWARE.
2222
2323
]]
2424

25-
-- lua-5.4
25+
-- >= lua-5.4
2626
if (math.pow == nil) then
2727
math.pow = function (x,y)
2828
return x ^ y
2929
end
3030
end
3131

32+
-- < lua-5.4
33+
if (unpack) then
34+
table.unpack = unpack
35+
end
36+
3237
require "cocos.cocos2d.Cocos2d"
3338
require "cocos.cocos2d.Cocos2dConstants"
3439
require "cocos.cocos2d.functions"

extensions/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local unpack = table.unpack
2+
13
if nil == cc.XMLHttpRequest then
24
return
35
end

thirdparty/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ endif()
5454

5555
if(LUA_ENGINE STREQUAL "plainlua")
5656
if(NOT DEFINED LUA_VERSION)
57-
set(LUA_VERSION "5.3.6" CACHE INTERNAL "The plainlua version")
57+
set(LUA_VERSION "5.4.3" CACHE INTERNAL "The plainlua version")
5858
endif()
5959
message(STATUS "Using plainlua: ${LUA_VERSION}")
6060
elseif(LUA_ENGINE STREQUAL "luajit")

thirdparty/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
## lua
9898
- plainlua
9999
- Upstream: http://www.lua.org/
100-
- Version: 5.3.6 with modified for bytecode 32/64bit compatible
100+
- Version: 5.4.3
101101
- License: MIT (http://www.lua.org/license.html)
102102

103103
- sol2

0 commit comments

Comments
 (0)