From 51bfd53e48d5310eb786069b758e0430129daf54 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 12 Dec 2011 08:08:18 -0500 Subject: Updated to Lua 5.2. --- core/events.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/events.lua') diff --git a/core/events.lua b/core/events.lua index 2145bee4..d6a7b270 100644 --- a/core/events.lua +++ b/core/events.lua @@ -226,9 +226,9 @@ function emit(event, ...) if not event then error(L('Undefined event name')) end local h = handlers[event] if not h then return end - local pcall, unpack, type = pcall, unpack, type + local pcall, table_unpack, type = pcall, table.unpack, type for i = 1, #h do - local ok, result = pcall(h[i], unpack{...}) + local ok, result = pcall(h[i], table_unpack{...}) if not ok then if not error_emitted then error_emitted = true @@ -276,7 +276,7 @@ connect('SCN', function(n) if not f then return end local args = {} for i = 2, #f do args[i - 1] = n[f[i]] end - return emit(f[1], unpack(args)) + return emit(f[1], table.unpack(args)) end) -- Set event constants. -- cgit v1.2.3