浏览代码

neko optimization

Nicolas Cannasse 17 年之前
父节点
当前提交
7a9a3af28d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      std/haxe/io/Output.hx

+ 4 - 0
std/haxe/io/Output.hx

@@ -223,7 +223,11 @@ class Output {
 	}
 	}
 
 
 	public function writeString( s : String ) {
 	public function writeString( s : String ) {
+		#if neko
+		var b = untyped new Bytes(s.length,s.__s);
+		#else
 		var b = Bytes.ofString(s);
 		var b = Bytes.ofString(s);
+		#end
 		writeFullBytes(b,0,b.length);
 		writeFullBytes(b,0,b.length);
 	}
 	}