diff --git a/Details.toc b/Details.toc index 9ceec088..17921508 100644 --- a/Details.toc +++ b/Details.toc @@ -1,4 +1,4 @@ -## Interface: 80000 +## Interface: 80100 ## Title: Details ## Notes: Computes detailed infos about combats. ## SavedVariables: _detalhes_global diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.lua b/Libs/AceAddon-3.0/AceAddon-3.0.lua index b338695f..60215b7b 100644 --- a/Libs/AceAddon-3.0/AceAddon-3.0.lua +++ b/Libs/AceAddon-3.0/AceAddon-3.0.lua @@ -28,7 +28,7 @@ -- end -- @class file -- @name AceAddon-3.0.lua --- @release $Id: AceAddon-3.0.lua 1084 2013-04-27 20:14:11Z nevcairiel $ +-- @release $Id: AceAddon-3.0.lua 1184 2018-07-21 14:13:14Z nevcairiel $ local MAJOR, MINOR = "AceAddon-3.0", 12 local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) @@ -62,43 +62,12 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) -- we check to see if the func is passed is actually a function here and don't error when it isn't -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[select('#', ...)](func, ...) + return xpcall(func, errorhandler, ...) end end diff --git a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua index eaa0d5d6..3bd4a372 100644 --- a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -1,5 +1,5 @@ ---[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]] -local MAJOR, MINOR = "CallbackHandler-1.0", 6 +--[[ $Id: CallbackHandler-1.0.lua 1186 2018-07-21 14:19:18Z nevcairiel $ ]] +local MAJOR, MINOR = "CallbackHandler-1.0", 7 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed @@ -22,41 +22,15 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local next, xpcall, eh = ... - - local method, ARGS - local function call() method(ARGS) end - - local function dispatch(handlers, ...) - local index - index, method = next(handlers) - if not method then return end - local OLD_ARGS = ARGS - ARGS = ... - repeat - xpcall(call, eh) - index, method = next(handlers, index) - until not method - ARGS = OLD_ARGS - end - - return dispatch - ]] - - local ARGS, OLD_ARGS = {}, {} - for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end - code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler) +local function Dispatch(handlers, ...) + local index, method = next(handlers) + if not method then return end + repeat + xpcall(method, errorhandler, ...) + index, method = next(handlers, index) + until not method end -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) - -------------------------------------------------------------------------- -- CallbackHandler:New -- @@ -87,7 +61,7 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll local oldrecurse = registry.recurse registry.recurse = oldrecurse + 1 - Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...) + Dispatch(events[eventname], eventname, ...) registry.recurse = oldrecurse diff --git a/Libs/LibCompress/LibCompress.lua b/Libs/LibCompress/LibCompress.lua index 63bda273..87ce1e4f 100644 --- a/Libs/LibCompress/LibCompress.lua +++ b/Libs/LibCompress/LibCompress.lua @@ -5,12 +5,12 @@ -- Authors: jjsheets and Galmok of European Stormrage (Horde) -- Email : sheets.jeff@gmail.com and galmok@gmail.com -- Licence: GPL version 2 (General Public License) --- Revision: $Revision: 81 $ --- Date: $Date: 2018-02-25 06:31:34 +0000 (Sun, 25 Feb 2018) $ +-- Revision: $Revision: 83 $ +-- Date: $Date: 2018-07-03 14:33:48 +0000 (Tue, 03 Jul 2018) $ ---------------------------------------------------------------------------------- -local LibCompress = LibStub:NewLibrary("LibCompress", 90000 + tonumber(("$Revision: 81 $"):match("%d+"))) +local LibCompress = LibStub:NewLibrary("LibCompress", 90000 + tonumber(("$Revision: 83 $"):match("%d+"))) if not LibCompress then return end @@ -938,13 +938,9 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars) c = string_sub(encodeBytes, i, i) if not encode_translate[c] then -- this loop will update escapeChar and r - while r < 256 and taken[string_char(r)] do + while r >= 256 or taken[string_char(r)] do r = r + 1 if r > 255 then -- switch to next escapeChar - if escapeChar == "" then -- we are out of escape chars and we need more! - return nil, "Out of escape characters" - end - codecTable["decode_search"..tostring(escapeCharIndex)] = escape_for_gsub(escapeChar).."([".. escape_for_gsub(table_concat(decode_search)).."])" codecTable["decode_translate"..tostring(escapeCharIndex)] = decode_translate table_insert(decode_func_string, "str = str:gsub(self.decode_search"..tostring(escapeCharIndex)..", self.decode_translate"..tostring(escapeCharIndex)..");") @@ -952,6 +948,10 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars) escapeCharIndex = escapeCharIndex + 1 escapeChar = string_sub(escapeChars, escapeCharIndex, escapeCharIndex) + if escapeChar == "" then -- we are out of escape chars and we need more! + return nil, "Out of escape characters" + end + r = 0 decode_search = {} decode_translate = {} @@ -980,7 +980,6 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars) encode_func = assert(loadstring("return function(self, str) return str:gsub(self.encode_search, self.encode_translate); end"))() decode_func = assert(loadstring(decode_func_string))() - codecTable.encode_search = encode_search codecTable.encode_translate = encode_translate codecTable.Encode = encode_func @@ -1253,4 +1252,4 @@ end function LibCompress:fcs32final(uFcs32) return bit_bnot(uFcs32) -end +end \ No newline at end of file diff --git a/Libs/LibCompress/LibCompress.toc b/Libs/LibCompress/LibCompress.toc index 08c48d22..ca237574 100644 --- a/Libs/LibCompress/LibCompress.toc +++ b/Libs/LibCompress/LibCompress.toc @@ -1,14 +1,14 @@ -## Interface: 70300 +## Interface: 70300 ## Title: Lib: Compress ## Notes: Compression and Decompression library ## Author: Galmok at Stormrage-EU (Horde) and JJSheets -## Version: r82-release +## Version: r84-release ## X-Website: http://www.wowace.com/addons/libcompress/ ## X-Category: Library ## X-eMail: galmok AT gmail DOT com, sheets DOT jeff AT gmail DOT com -## X-License: LGPL v2.1 +## X-License: GPL v2 ## LoadOnDemand: 1 LibStub\LibStub.lua -lib.xml +lib.xml \ No newline at end of file diff --git a/Libs/LibCompress/lib.xml b/Libs/LibCompress/lib.xml index d35c6a9f..c85b2134 100644 --- a/Libs/LibCompress/lib.xml +++ b/Libs/LibCompress/lib.xml @@ -1,4 +1,4 @@