This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Patch to remove dependency to AceLibrary and use LibStub instead.
Index: Libs/Deformat-2.0/Deformat-2.0.lua===================================================================--- Libs/Deformat-2.0/Deformat-2.0.lua (revision 49)+++ Libs/Deformat-2.0/Deformat-2.0.lua (working copy)@@ -11,14 +11,11 @@ ]] local MAJOR_VERSION = "Deformat-2.0"-local MINOR_VERSION = 90000 + tonumber(("$Revision$"):match("(%d+)"))+local MINOR_VERSION = tonumber(("$Revision$"):match("(%d+)"))+local lib, oldMinor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)+if not lib then return end-if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary") end-if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end--local Deformat = {}- do local sequences = { ["%d*d"] = "%%-?%%d+",@@ -199,7 +196,7 @@ end end- function Deformat:Deformat(text, a1, ...)+ function lib:Deformat(text, a1, ...) self:argCheck(text, 2, "string") self:argCheck(a1, 3, "string") local pattern = (''):join(a1, ...)@@ -211,8 +208,5 @@ end local mt = getmetatable(Deformat) or {}-mt.__call = Deformat.Deformat-setmetatable(Deformat, mt)--AceLibrary:Register(Deformat, MAJOR_VERSION, MINOR_VERSION)-Deformat = nil+mt.__call = lib.Deformat+setmetatable(lib, mt)
Poke.
self:argCheck(text, 2, "string") self:argCheck(a1, 3, "string")
assert(type(text) == "string", "Bad argument #2 to :Deformat (string expected)") assert(type(a1) == "string", "Bad argument #3 to :Deformat (string expected)")
To post a comment, please login or register a new account.