Forráskód Böngészése

update `@:native("hx::` to `@:native("::hx::` (fixes #9452)

Aleksandr Kuzmenko 5 éve
szülő
commit
7711bb543c

+ 3 - 3
std/cpp/Native.hx

@@ -35,11 +35,11 @@ extern class Native {
 	@:native("memcpy")
 	static function nativeMemcpy(dest:cpp.Star<cpp.Void>, src:cpp.Star<cpp.Void>, bytes:Int):Void;
 
-	@:native("hx::ClassSizeOf") @:templatedCall
+	@:native("::hx::ClassSizeOf") @:templatedCall
 	static function sizeof<T>(t:T):Int;
 
 	#if !cppia
-	@:native("hx::Dereference")
+	@:native("::hx::Dereference")
 	static function star<T>(ptr:cpp.Star<T>):cpp.Reference<T>;
 
 	@:generic
@@ -75,7 +75,7 @@ extern class Native {
 			nativeFree(cast ptr);
 	}
 
-	@:native("hx::StarOf")
+	@:native("::hx::StarOf")
 	static function addressOf<T>(inVariable:Reference<T>):Star<T>;
 	#else
 	static inline function addressOf<T>(inVariable:Reference<T>):Star<T> {

+ 1 - 1
std/cpp/NativeGc.hx

@@ -32,7 +32,7 @@ extern class NativeGc {
 	@:native("_hx_add_finalizable")
 	static function addFinalizable(instance:{function finalize():Void;}, inPin:Bool):Void;
 
-	@:native("hx::InternalNew")
+	@:native("::hx::InternalNew")
 	static function allocGcBytesRaw(inBytes:Int, isContainer:Bool):RawPointer<cpp.Void>;
 
 	inline static function allocGcBytes(inBytes:Int):Pointer<cpp.Void> {

+ 1 - 1
std/cpp/RawConstPointer.hx

@@ -24,6 +24,6 @@ package cpp;
 
 @:unreflective
 extern class RawConstPointer<T> implements ArrayAccess<T> {
-	@:native("hx::AddressOf")
+	@:native("::hx::AddressOf")
 	static function addressOf<T>(t:T):RawConstPointer<T>;
 }

+ 1 - 1
std/cpp/RawPointer.hx

@@ -24,6 +24,6 @@ package cpp;
 
 @:unreflective
 extern class RawPointer<T> extends RawConstPointer<T> {
-	@:native("hx::AddressOf")
+	@:native("::hx::AddressOf")
 	static function addressOf<T>(t:T):RawPointer<T>;
 }

+ 2 - 2
std/cpp/StdString.hx

@@ -24,7 +24,7 @@ package cpp;
 
 using cpp.NativeString;
 
-@:native("hx::StdString")
+@:native("::hx::StdString")
 @:include("hx/StdString.h")
 @:stackOnly
 @:structAccess
@@ -34,7 +34,7 @@ extern class StdString {
 	static var npos(default, null):Int;
 
 	// function new(inData:StdStringData);
-	@:native("hx::StdString")
+	@:native("::hx::StdString")
 	static function ofString(s:String):StdString;
 
 	// function toString():String;

+ 1 - 1
std/cpp/StdStringRef.hx

@@ -24,7 +24,7 @@ package cpp;
 
 using cpp.NativeString;
 
-@:native("hx::StdString const &")
+@:native("::hx::StdString const &")
 @:include("hx/StdString.h")
 @:structAccess
 extern class StdStringRef {

+ 1 - 1
std/cpp/Stdlib.hx

@@ -35,7 +35,7 @@ extern class Stdlib {
 	@:native("memcpy")
 	static function nativeMemcpy(dest:cpp.RawPointer<cpp.Void>, src:cpp.RawConstPointer<cpp.Void>, bytes:Int):Void;
 
-	@:native("hx::ClassSizeOf") @:templatedCall
+	@:native("::hx::ClassSizeOf") @:templatedCall
 	static function sizeof<T>(t:T):Int;
 
 	inline static function memcpy<DEST, SRC>(dest:cpp.Pointer<DEST>, src:cpp.ConstPointer<SRC>, bytes:Int):Void

+ 6 - 6
std/cpp/_std/Reflect.hx

@@ -32,22 +32,22 @@ class Reflect {
 
 	public static function field(o:Dynamic, field:String):Dynamic
 		untyped {
-			return (o == null) ? null : o.__Field(field, untyped __cpp__("hx::paccNever"));
+			return (o == null) ? null : o.__Field(field, untyped __cpp__("::hx::paccNever"));
 		}
 
 	public static function setField(o:Dynamic, field:String, value:Dynamic):Void
 		untyped {
 			if (o != null)
-				o.__SetField(field, value, untyped __cpp__("hx::paccNever"));
+				o.__SetField(field, value, untyped __cpp__("::hx::paccNever"));
 		}
 
 	public static function getProperty(o:Dynamic, field:String):Dynamic {
-		return (o == null) ? null : o.__Field(field, untyped __cpp__("hx::paccAlways"));
+		return (o == null) ? null : o.__Field(field, untyped __cpp__("::hx::paccAlways"));
 	}
 
 	public static function setProperty(o:Dynamic, field:String, value:Dynamic):Void {
 		if (o != null)
-			o.__SetField(field, value, untyped __cpp__("hx::paccAlways"));
+			o.__SetField(field, value, untyped __cpp__("::hx::paccAlways"));
 	}
 
 	public static function callMethod(o:Dynamic, func:haxe.Constraints.Function, args:Array<Dynamic>):Dynamic
@@ -55,7 +55,7 @@ class Reflect {
 			if (func != null && func.__GetType() == ObjectType.vtString) {
 				if (o == null)
 					throw cpp.ErrorConstants.invalidObject;
-				func = o.__Field(func, untyped __cpp__("hx::paccDynamic"));
+				func = o.__Field(func, untyped __cpp__("::hx::paccDynamic"));
 			}
 			if (func == null)
 				throw cpp.ErrorConstants.nullFunctionPointer;
@@ -115,7 +115,7 @@ class Reflect {
 		if (untyped o.__GetType() == ObjectType.vtString)
 			return o;
 		if (untyped o.__GetType() == ObjectType.vtArray)
-			return untyped o.__Field("copy", untyped __cpp__("hx::paccDynamic"))();
+			return untyped o.__Field("copy", untyped __cpp__("::hx::paccDynamic"))();
 		var o2:Dynamic = {};
 		for (f in Reflect.fields(o))
 			Reflect.setField(o2, f, Reflect.field(o, f));

+ 1 - 1
std/cpp/cppia/Host.hx

@@ -37,7 +37,7 @@ class Host {
 	}
 	#end
 
-	@:native("hx::EnableJit")
+	@:native("::hx::EnableJit")
 	extern public static function enableJit(enable:Bool):Void;
 
 	public static function runFile(filename:String) {

+ 1 - 1
std/cpp/cppia/Module.hx

@@ -22,7 +22,7 @@
 
 package cpp.cppia;
 
-@:native("hx::CppiaLoadedModule")
+@:native("::hx::CppiaLoadedModule")
 @:build(cpp.cppia.HostClasses.include())
 extern class Module {
 	@:native("__scriptable_cppia_from_string")