Skip to content

Use lua-5.4.3 as default plainlua version #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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