Files
libdogtag-3-0/Cleanup.lua
ckknight 5e65914e11 - (following changes cut CPU usage roughly 25% and memory usage roughly 20%
- instead of registering tags as strings, they will be registered as functions.
- add ability to mark tags as static, which means if all args are literal or static (or there are no args), then the function will be run on compiletime rather than runtime
- remove number flattening in parser (e.g. 1/4 => 0.25)
- remove globals field and FakeGlobal system
- make a lot of error messages better
2008-03-19 09:12:09 +00:00

29 lines
582 B
Lua

local MAJOR_VERSION = "LibDogTag-3.0"
local MINOR_VERSION = tonumber(("$Revision$"):match("%d+")) or 0
if MINOR_VERSION > _G.DogTag_MINOR_VERSION then
_G.DogTag_MINOR_VERSION = MINOR_VERSION
end
local DogTag, oldMinor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
_G.DogTag_MINOR_VERSION = nil
if not DogTag then
_G.DogTag_funcs = nil
return
end
local oldLib
if next(DogTag) ~= nil then
oldLib = {}
for k,v in pairs(DogTag) do
oldLib[k] = v
DogTag[k] = nil
end
end
DogTag.oldLib = oldLib
for _,v in ipairs(_G.DogTag_funcs) do
v(DogTag)
end
_G.DogTag_funcs = nil