瀏覽代碼

[cpp] Mark Gc functions as extern.

hughsando 8 年之前
父節點
當前提交
8b66588474
共有 1 個文件被更改,包括 19 次插入14 次删除
  1. 19 14
      std/cpp/vm/Gc.hx

+ 19 - 14
std/cpp/vm/Gc.hx

@@ -56,43 +56,48 @@ class Gc
 
 
 
-   @:native("__hxcpp_enable")
+   @:native("__hxcpp_enable") @:extern
    static public function enable(inEnable:Bool) : Void { }
 
-   @:native("__hxcpp_collect")
+   @:native("__hxcpp_collect") @:extern
    static public function run(major:Bool) : Void { }
 
-   @:native("__hxcpp_gc_compact")
+   @:native("__hxcpp_gc_compact") @:extern
    static public function compact() : Void { }
 
-   @:native("__hxcpp_gc_trace")
-   static public function trace(sought:Class<Dynamic>,printInstances:Bool=true) : Int return 0;
+   @:native("__hxcpp_gc_trace") @:extern
+   static public function nativeTrace(sought:Class<Dynamic>,printInstances:Bool) : Int return 0;
 
-   @:native("__hxcpp_gc_do_not_kill")
+   static public function trace(sought:Class<Dynamic>,printInstances:Bool=true) : Int
+   {
+      return nativeTrace(sought,printInstances);
+   }
+
+   @:native("__hxcpp_gc_do_not_kill") @:extern
    static public function doNotKill(inObject:Dynamic) : Void { }
 
-   @:native("__hxcpp_get_next_zombie")
+   @:native("__hxcpp_get_next_zombie") @:extern
    static public function getNextZombie() : Dynamic return null;
 
-   @:native("__hxcpp_gc_safe_point")
+   @:native("__hxcpp_gc_safe_point") @:extern
    static public function safePoint() : Void { }
 
-   @:native("__hxcpp_enter_gc_free_zone")
+   @:native("__hxcpp_enter_gc_free_zone") @:extern
    static public function enterGCFreeZone() : Void { }
 
-   @:native("__hxcpp_exit_gc_free_zone")
+   @:native("__hxcpp_exit_gc_free_zone") @:extern
    static public function exitGCFreeZone() : Void { }
 
-   @:native("__hxcpp_set_minimum_free_space")
+   @:native("__hxcpp_set_minimum_free_space") @:extern
    static public function setMinimumFreeSpace(inBytes:Int) : Void { }
 
-   @:native("__hxcpp_set_target_free_space_percentage")
+   @:native("__hxcpp_set_target_free_space_percentage") @:extern
    static public function setTargetFreeSpacePercentage(inPercentage:Int) : Void { }
 
-   @:native("__hxcpp_set_minimum_working_memory")
+   @:native("__hxcpp_set_minimum_working_memory") @:extern
    static public function setMinimumWorkingMemory(inBytes:Int) : Void { }
 
-   @:native("__hxcpp_set_finalizer")
+   @:native("__hxcpp_set_finalizer") @:extern
    static public function setFinalizer<T>(inObject:T, inFinalizer:cpp.Callable<T->Void> ) : Void { }
 }