Fixes for data classes in neko/flash

This commit is contained in:
MattTuttle
2014-07-08 10:37:38 -05:00
parent b6ef69d974
commit 243bafee25
2 changed files with 5 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ class ArrayBufferView implements IMemoryRange {
buffer = new ArrayBuffer (#if !flash byteLength #end);
#if flash
while (byteLength > 0) { buffer.writeByte (0); }
for (i in 0...byteLength) { buffer.writeByte (0); }
buffer.position = 0;
#end
@@ -74,7 +74,9 @@ class ArrayBufferView implements IMemoryRange {
}
#if !flash
#if flash
buffer.endian = flash.utils.Endian.LITTLE_ENDIAN;
#else
buffer.bigEndian = false;
#end

View File

@@ -7,7 +7,7 @@ typedef Int16Array = js.html.Int16Array;
class Int16Array extends ArrayBufferView implements ArrayAccess<Int> {
public static inline var BYTES_PER_ELEMENT (default, null) = 2;
public static inline var BYTES_PER_ELEMENT = 2;
public var length (default, null):Int;