Fixes for data classes in neko/flash
This commit is contained in:
@@ -34,7 +34,7 @@ class ArrayBufferView implements IMemoryRange {
|
|||||||
buffer = new ArrayBuffer (#if !flash byteLength #end);
|
buffer = new ArrayBuffer (#if !flash byteLength #end);
|
||||||
|
|
||||||
#if flash
|
#if flash
|
||||||
while (byteLength > 0) { buffer.writeByte (0); }
|
for (i in 0...byteLength) { buffer.writeByte (0); }
|
||||||
buffer.position = 0;
|
buffer.position = 0;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
@@ -74,7 +74,9 @@ class ArrayBufferView implements IMemoryRange {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !flash
|
#if flash
|
||||||
|
buffer.endian = flash.utils.Endian.LITTLE_ENDIAN;
|
||||||
|
#else
|
||||||
buffer.bigEndian = false;
|
buffer.bigEndian = false;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ typedef Int16Array = js.html.Int16Array;
|
|||||||
class Int16Array extends ArrayBufferView implements ArrayAccess<Int> {
|
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;
|
public var length (default, null):Int;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user