Jelajahi Sumber

Require Pointer.addressOf to take a variable as argument

Valentin Lemière 9 tahun lalu
induk
melakukan
8e1f206ff1
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      std/cpp/Pointer.hx

+ 3 - 1
std/cpp/Pointer.hx

@@ -21,6 +21,8 @@
  */
  package cpp;
 
+import haxe.extern.AsVar;
+
 @:coreType
 extern class Pointer<T> extends ConstPointer<T> implements ArrayAccess<T>
 {
@@ -42,7 +44,7 @@ extern class Pointer<T> extends ConstPointer<T> implements ArrayAccess<T>
 
    public static function fromPointer<T>(inNativePointer:Dynamic) : Pointer<T>;
 
-   public static function addressOf<T>(inVariable:T) : Pointer<T>;
+   public static function addressOf<T>(inVariable:AsVar<T>) : Pointer<T>;
 
    public static function endOf<T:{}>(inVariable:T) : Pointer<cpp.Void>;