Browse Source

added optional weakKeys argument to ObjectMap

Simon Krajewski 12 years ago
parent
commit
fe94bc02af

+ 1 - 1
std/flash8/_std/haxe/ds/ObjectMap.hx

@@ -35,7 +35,7 @@ abstract ObjectMap({}) < K: { }, V > {
 		return untyped obj.__id__;
 	}
 	
-	public function new() {
+	public function new(weakKeys:Bool = false) {
 		this = untyped __new__(_global["Object"]);
 		untyped this.__keys__ = untyped __new__(_global["Object"]);
 	}

+ 1 - 1
std/haxe/ds/ObjectMap.hx

@@ -23,7 +23,7 @@
 package haxe.ds;
 
 extern class ObjectMap < K: { }, V > {
-	public function new():Void;
+	public function new(?weakKeys:Bool = false):Void;
 	public function set(key:K, value:V):Void;
 	public function get(key:K):V;
 	public function exists(key:K):Bool;

+ 0 - 1
std/haxe/ds/StringMap.hx

@@ -57,7 +57,6 @@ extern class StringMap<T> {
 	**/
 	public function remove( key : String ) : Bool;
 
-
 	/**
 		Returns an iterator of all keys in the hashtable.
 	**/

+ 1 - 1
std/js/_std/haxe/ds/ObjectMap.hx

@@ -35,7 +35,7 @@ abstract ObjectMap({}) < K: { }, V > {
 		return untyped obj.__id__;
 	}
 	
-	public inline function new() {
+	public inline function new(weakKeys:Bool = false) {
 		this = { };
 		untyped this.__keys__ = { };
 	}

+ 1 - 1
std/neko/_std/haxe/ds/ObjectMap.hx

@@ -24,7 +24,7 @@ package haxe.ds;
 @:coreApi
 abstract ObjectMap({})<K,V> {
 
-	public function new() : Void {
+	public function new(weakKeys:Bool = false) : Void {
 		this = untyped __dollar__hnew(0);
 	}
 

+ 1 - 1
std/php/_std/haxe/ds/ObjectMap.hx

@@ -28,7 +28,7 @@ abstract ObjectMap(StringMap<V>) < K: { }, V > {
 		return untyped __php__("spl_object_hash($key)");
 	}
 	
-	public function new() {
+	public function new(weakKeys:Bool = false) {
 		this = new StringMap<V>();
 	}