Bladeren bron

haxe.io.Bytes getI32/setI32 is now getInt32/setInt32, fixed neko 2.1 usage

Nicolas Cannasse 10 jaren geleden
bovenliggende
commit
0e0aa82336
2 gewijzigde bestanden met toevoegingen van 7 en 7 verwijderingen
  1. 3 3
      std/haxe/io/Bytes.hx
  2. 4 4
      std/haxe/io/FPHelper.hx

+ 3 - 3
std/haxe/io/Bytes.hx

@@ -224,7 +224,7 @@ class Bytes {
 		if( pos < 0 || pos + 8 > length ) throw Error.OutsideBounds;
 		return untyped __global__.__hxcpp_memory_get_double(b,pos);
 		#else
-		return FPHelper.i64ToDouble(getI32(pos),getI32(pos+4));
+		return FPHelper.i64ToDouble(getInt32(pos),getInt32(pos+4));
 		#end
 	}
 
@@ -295,7 +295,7 @@ class Bytes {
 	/**
 		Returns the 32 bit integer at given position (in low endian encoding).
 	**/
-	public inline function getI32( pos : Int ) : Int {
+	public inline function getInt32( pos : Int ) : Int {
 		#if neko_v21
 		return untyped $sget32(b, pos, false);
 		#else
@@ -306,7 +306,7 @@ class Bytes {
 	/**
 		Store the 32 bit integer at given position (in low endian encoding).
 	**/
-	public inline function setI32( pos : Int, value : Int ) : Void {
+	public inline function setInt32( pos : Int, value : Int ) : Void {
 		#if neko_v21
 		untyped $sset32(b, pos, value, false);
 		#else

+ 4 - 4
std/haxe/io/FPHelper.hx

@@ -62,7 +62,7 @@ class FPHelper {
 	public static function i32ToFloat( i : Int ) : Float {
 		#if neko
 			#if neko_v21
-			return untyped $itof(i);
+			return untyped $itof(i,false);
 			#else
 			var helper = helperf.value;
 			if( helper == null )
@@ -109,7 +109,7 @@ class FPHelper {
 	public static function floatToI32( f : Float ) : Int {
 		#if neko
 			#if neko_v21
-			return untyped $ftoi(f);
+			return untyped $ftoi(f,false);
 			#else
 			var r = _float_bytes(f,false);
 			return untyped $sget(r,0) | ($sget(r,1)<<8) | ($sget(r,2)<<16) | ($sget(r,3)<<24);
@@ -149,7 +149,7 @@ class FPHelper {
 	public static function i64ToDouble( low : Int, high : Int ) : Float {
 		#if neko
 			#if neko_v21
-			return untyped $itod(low,high);
+			return untyped $itod(low,high,false);
 			#else
 			var helper = helperd.value;
 			if( helper == null )
@@ -215,7 +215,7 @@ class FPHelper {
 				helper[1] = haxe.Int64.ofInt(0);
 			}
 			var i64 : haxe.Int64 = helper[1], int2 = helper[0];
-			untyped $dtoi(v,int2);
+			untyped $dtoi(v,int2,false);
 			@:privateAccess {
 				i64.low = int2[0];
 				i64.high = int2[1];