public
Description: WoW Addon - Food/water macro generator
Homepage: http://www.tekkub.net
Clone URL: git://github.com/tekkub/buffet.git
Click here to lend your support to: buffet and make a donation at www.pledgie.com !
And CRLF can suck the right one
tekkub (author)
Fri Jul 18 22:08:40 -0700 2008
commit  20043740c577fc9d6182ead67aafd44de816dd82
tree    58865a9d861d4c4ef5b95287640a4f6c2d5cb789
parent  3d17351c6f78556c25e83fff4f035f6a89c6d02a
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -1,30 +1,30 @@
0
--- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
0
--- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
0
-local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
0
-local LibStub = _G[LIBSTUB_MAJOR]
0
-
0
-if not LibStub or LibStub.minor < LIBSTUB_MINOR then
0
- LibStub = LibStub or {libs = {}, minors = {} }
0
- _G[LIBSTUB_MAJOR] = LibStub
0
- LibStub.minor = LIBSTUB_MINOR
0
-
0
- function LibStub:NewLibrary(major, minor)
0
- assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
0
- minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
0
-
0
- local oldminor = self.minors[major]
0
- if oldminor and oldminor >= minor then return nil end
0
- self.minors[major], self.libs[major] = minor, self.libs[major] or {}
0
- return self.libs[major], oldminor
0
- end
0
-
0
- function LibStub:GetLibrary(major, silent)
0
- if not self.libs[major] and not silent then
0
- error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
0
- end
0
- return self.libs[major], self.minors[major]
0
- end
0
-
0
- function LibStub:IterateLibraries() return pairs(self.libs) end
0
- setmetatable(LibStub, { __call = LibStub.GetLibrary })
0
-end
0
+-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
0
+-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
0
+local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
0
+local LibStub = _G[LIBSTUB_MAJOR]
0
+
0
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
0
+ LibStub = LibStub or {libs = {}, minors = {} }
0
+ _G[LIBSTUB_MAJOR] = LibStub
0
+ LibStub.minor = LIBSTUB_MINOR
0
+
0
+ function LibStub:NewLibrary(major, minor)
0
+ assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
0
+ minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
0
+
0
+ local oldminor = self.minors[major]
0
+ if oldminor and oldminor >= minor then return nil end
0
+ self.minors[major], self.libs[major] = minor, self.libs[major] or {}
0
+ return self.libs[major], oldminor
0
+ end
0
+
0
+ function LibStub:GetLibrary(major, silent)
0
+ if not self.libs[major] and not silent then
0
+ error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
0
+ end
0
+ return self.libs[major], self.minors[major]
0
+ end
0
+
0
+ function LibStub:IterateLibraries() return pairs(self.libs) end
0
+ setmetatable(LibStub, { __call = LibStub.GetLibrary })
0
+end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0
@@ -1,17 +1,17 @@
0
-
0
-local ids = LibStub:NewLibrary("tekIDmemo", 1)
0
-if not ids then return end
0
-
0
-setmetatable(ids, {
0
- __index = function(t,i)
0
- if type(i) ~= "string" then
0
- t[i] = false
0
- return
0
- end
0
-
0
- local id = tonumber(i:match("item:(%d+)"))
0
- t[i] = id
0
- return id
0
- end,
0
-})
0
-
0
+
0
+local ids = LibStub:NewLibrary("tekIDmemo", 1)
0
+if not ids then return end
0
+
0
+setmetatable(ids, {
0
+ __index = function(t,i)
0
+ if type(i) ~= "string" then
0
+ t[i] = false
0
+ return
0
+ end
0
+
0
+ local id = tonumber(i:match("item:(%d+)"))
0
+ t[i] = id
0
+ return id
0
+ end,
0
+})
0
+

Comments

    No one has commented yet.