Browse Source

Use native resizing to cpp target

Hugh Sanderson 16 years ago
parent
commit
e88328c80e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/haxe/io/BytesOutput.hx

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

@@ -110,7 +110,11 @@ class BytesOutput extends Output {
 
 	override function prepare( size : Int ) {
 		if( size > 0 )
+	#if cpp
+			untyped b.__Resize(size);
+	#else
 			b[size-1] = b[size-1];
+	#end
 	}
 
 	override function writeString( s : String ) {