浏览代码

fix with neko (haxe 3.x macro interp)

Nicolas Cannasse 7 年之前
父节点
当前提交
fdcfb49845
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      hxd/impl/UncheckedBytes.hx

+ 8 - 0
hxd/impl/UncheckedBytes.hx

@@ -9,11 +9,19 @@ abstract UncheckedBytes(InnerData) {
 	}
 
 	@:arrayAccess inline function get( i : Int ) : Int {
+		#if neko
+		return untyped $sget(b,i);
+		#else
 		return this[i];
+		#end
 	}
 
 	@:arrayAccess inline function set( i : Int, v : Int ) : Int {
+		#if neko
+		untyped $sset(b,i,v);
+		#else
 		this[i] = v;
+		#end
 		return v;
 	}