aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-xml/0001-Fix-error-where-TAG-should-be-xml.TAG.patch
blob: 8b6763b910dd8002cb3870c7a00720fea9890c37 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 5c266ff6effbb1c89c3798b7332ed21685cf6acb Mon Sep 17 00:00:00 2001
From: Ted Trask <ttrask01@yahoo.com>
Date: Wed, 30 Dec 2015 20:36:52 +0000
Subject: [PATCH] Fix error where TAG should be xml.TAG

---
 LuaXml.lua | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/LuaXml.lua b/LuaXml.lua
index 8a10a2d..2ebc0ae 100644
--- a/LuaXml.lua
+++ b/LuaXml.lua
@@ -8,9 +8,9 @@ xml.TAG = 0
 function xml.tag(var,tag)
 	if base.type(var)~="table" then return end
 	if base.type(tag)=="nil" then 
-		return var[TAG]
+		return var[xml.TAG]
 	end
-	var[TAG] = tag
+	var[xml.TAG] = tag
 end
 
 -- creates a new LuaXML object either by setting the metatable of an existing Lua table or by setting its tag
@@ -21,7 +21,7 @@ function xml.new(arg)
 	end
 	local var={}
 	base.setmetatable(var,{__index=xml, __tostring=xml.str})
-	if base.type(arg)=="string" then var[TAG]=arg end
+	if base.type(arg)=="string" then var[xml.TAG]=arg end
 	return var
 end
 
@@ -115,4 +115,4 @@ function xml.find(var, tag, attributeKey,attributeValue)
 	end
 end
 
-return xml
\ No newline at end of file
+return xml
-- 
2.6.4