Browse Source

make sure addChild() is typed by parse() with DCE (fixed issue #688)

Nicolas Cannasse 13 years ago
parent
commit
ca6fdf1b2d
2 changed files with 4 additions and 2 deletions
  1. 2 1
      std/cpp/_std/Xml.hx
  2. 2 1
      std/neko/_std/Xml.hx

+ 2 - 1
std/cpp/_std/Xml.hx

@@ -98,7 +98,8 @@ enum XmlType {
 				x._parent = untyped __this__.cur;
 				x.nodeType = Xml.DocType;
 				x._nodeValue = (new String(text)).substr(1);
-				untyped __this__.cur.addChild(x);
+				var p : Xml = untyped __this__.cur;
+				p.addChild(x);
 			},
 			done : function() {
 				untyped __this__.cur = __this__.cur._parent;

+ 2 - 1
std/neko/_std/Xml.hx

@@ -110,7 +110,8 @@ enum XmlType {
 				x._parent = untyped __this__.cur;
 				x.nodeType = Xml.DocType;
 				x._nodeValue = new String(text).substr(1);
-				untyped __this__.cur.addChild(x);
+				var p : Xml = untyped __this__.cur;
+				p.addChild(x);
 			},
 			done : function() {
 				untyped __this__.cur = __this__.cur._parent;