Browse Source

added obj as callb param

Nicolas Cannasse 8 years ago
parent
commit
c6486b5952
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/hl/Gc.hx

+ 2 - 2
std/hl/Gc.hx

@@ -52,7 +52,7 @@ class Gc {
 		a change has been performed since last check. The callback parameter is true if the object was collected.
 		It is necessary to enable the Track flag in Gc.flags
 	**/
-	public static function track( obj : Dynamic, field : String, callb : Bool -> Void ) {
+	public static function track( obj : Dynamic, field : String, callb : Dynamic -> Bool -> Void ) {
 		var oval = if( Reflect.isFunction(obj) ) Api.getClosureValue(obj) else obj;
 		var fid = if( ~/^[0-9]+$/.match(field) ) Std.parseInt(field) else @:privateAccess field.bytes.hash();
 		if( !_track(oval, fid, callb) )
@@ -92,7 +92,7 @@ class Gc {
 	@:hlNative("std", "gc_enable") public static function enable( b : Bool ) : Void {}
 	@:hlNative("std", "gc_major") public static function major() : Void {}
 	@:hlNative("std", "gc_stats") static function _stats( totalAllocated : hl.Ref<Float>, allocationCount : hl.Ref<Float>, currentMemory : hl.Ref<Float> ) : Void {}
-	@:hlNative("std", "gc_track") static function _track( obj : Dynamic, fid : Int, callb : Bool -> Void ) : Bool { return false; }
+	@:hlNative("std", "gc_track") static function _track( obj : Dynamic, fid : Int, callb : Dynamic -> Bool -> Void ) : Bool { return false; }
 	@:hlNative("std", "gc_untrack") static function _untrack( obj : Dynamic ) : Bool { return false; }
 
 	@:hlNative("std", "gc_get_flags") static function _get_flags() : Int { return 0; }