diff --git a/src/modules/graphics/wrap_Graphics.lua b/src/modules/graphics/wrap_Graphics.lua index 3f1b3879c..7130d4b23 100644 --- a/src/modules/graphics/wrap_Graphics.lua +++ b/src/modules/graphics/wrap_Graphics.lua @@ -24,7 +24,7 @@ misrepresented as being the original software. local table_concat = table.concat local ipairs = ipairs -local pcall = pcall +local pcall, type, error = pcall, type, error local graphics = love.graphics function graphics.newVideo(file, settings) diff --git a/src/modules/love/boot.lua b/src/modules/love/boot.lua index 5c71fd50f..f062d7d63 100644 --- a/src/modules/love/boot.lua +++ b/src/modules/love/boot.lua @@ -441,6 +441,8 @@ function love.init() end end +local xpcall = xpcall +local coroutine_yield = coroutine.yield local print, debug, tostring = print, debug, tostring local function error_printer(msg, layer) @@ -498,7 +500,7 @@ return function() end local _, retval, restartvalue = xpcall(func, deferErrhand) if retval then return retval, restartvalue end - coroutine.yield() + coroutine_yield() end return 1 diff --git a/src/modules/love/callbacks.lua b/src/modules/love/callbacks.lua index 16ca75e7f..0ef3095de 100644 --- a/src/modules/love/callbacks.lua +++ b/src/modules/love/callbacks.lua @@ -202,6 +202,7 @@ function love.run() end end +local pcall, table = pcall, table local debug, print, tostring, error = debug, print, tostring, error function love.threaderror(t, err) diff --git a/src/modules/sound/wrap_SoundData.lua b/src/modules/sound/wrap_SoundData.lua index ebc2c8879..dd27736c6 100644 --- a/src/modules/sound/wrap_SoundData.lua +++ b/src/modules/sound/wrap_SoundData.lua @@ -34,7 +34,7 @@ end local status, ffi = pcall(require, "ffi") if not status then return end -local tonumber, assert, error = tonumber, assert, error +local tonumber, assert, error, type = tonumber, assert, error, type local floor = math.floor local float = ffi.typeof("float")