Skip to content

Commit

Permalink
Merge pull request #520 from adxeproject/lua-5.4
Browse files Browse the repository at this point in the history
Use lua-5.4.3 as default plainlua version
  • Loading branch information
halx99 committed Oct 8, 2021
2 parents aad17cb + 1ada732 commit 909d90d
Show file tree
Hide file tree
Showing 101 changed files with 16,319 additions and 23,483 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ THE SOFTWARE.
]]

-- Cocos2d-Lua core functions
local unpack = table.unpack
cc.loaded_packages = {}
local loaded_packages = cc.loaded_packages

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ THE SOFTWARE.
]]

local unpack = table.unpack
local transition = {}

local ACTION_EASING = {}
Expand Down
7 changes: 6 additions & 1 deletion extensions/scripting/lua-bindings/script/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ THE SOFTWARE.
]]

-- lua-5.4
-- >= lua-5.4
if (math.pow == nil) then
math.pow = function (x,y)
return x ^ y
end
end

-- < lua-5.4
if (unpack) then
table.unpack = unpack
end

require "cocos.cocos2d.Cocos2d"
require "cocos.cocos2d.Cocos2dConstants"
require "cocos.cocos2d.functions"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local unpack = table.unpack

if nil == cc.XMLHttpRequest then
return
end
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endif()

if(LUA_ENGINE STREQUAL "plainlua")
if(NOT DEFINED LUA_VERSION)
set(LUA_VERSION "5.3.6" CACHE INTERNAL "The plainlua version")
set(LUA_VERSION "5.4.3" CACHE INTERNAL "The plainlua version")
endif()
message(STATUS "Using plainlua: ${LUA_VERSION}")
elseif(LUA_ENGINE STREQUAL "luajit")
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
## lua
- plainlua
- Upstream: http://www.lua.org/
- Version: 5.3.6 with modified for bytecode 32/64bit compatible
- Version: 5.4.3
- License: MIT (http://www.lua.org/license.html)

- sol2
Expand Down
Loading

0 comments on commit 909d90d

Please sign in to comment.