Browse Source

Require Pointer.addressOf to take a variable as argument

Valentin Lemière 9 years ago
parent
commit
8e1f206ff1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      std/cpp/Pointer.hx

+ 3 - 1
std/cpp/Pointer.hx

@@ -21,6 +21,8 @@
  */
  */
  package cpp;
  package cpp;
 
 
+import haxe.extern.AsVar;
+
 @:coreType
 @:coreType
 extern class Pointer<T> extends ConstPointer<T> implements ArrayAccess<T>
 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 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>;
    public static function endOf<T:{}>(inVariable:T) : Pointer<cpp.Void>;