Skip to content

Commit

Permalink
StringMap<T> => Map<String,T>
Browse files Browse the repository at this point in the history
  • Loading branch information
andyli committed Sep 13, 2014
1 parent 32cfdb9 commit 5d7d358
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern class Sys {
/**
Returns the whole environement variables.
**/
static function environment() : haxe.ds.StringMap<String>;
static function environment() : Map<String,String>;

/**
Suspend the current execution for the given time (in seconds).
Expand Down
2 changes: 1 addition & 1 deletion std/cpp/_std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
return new String(sys_exe_path());
}

public static function environment() : haxe.ds.StringMap<String> {
public static function environment() : Map<String,String> {
var vars:Array<String> = sys_env();
var result = new haxe.ds.StringMap<String>();
var i = 0;
Expand Down
2 changes: 1 addition & 1 deletion std/cs/_std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Sys {
_env.set(s, v);
}

public static function environment() : haxe.ds.StringMap<String>
public static function environment() : Map<String,String>
{
if (_env == null)
{
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/Http.hx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Http {
#if sys
public var noShutdown : Bool;
public var cnxTimeout : Float;
public var responseHeaders : haxe.ds.StringMap<String>;
public var responseHeaders : Map<String,String>;
var chunk_size : Null<Int>;
var chunk_buf : haxe.io.Bytes;
var file : { param : String, filename : String, io : haxe.io.Input, size : Int, mimeType : String };
Expand Down
8 changes: 4 additions & 4 deletions std/haxe/macro/Context.hx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class Context {
Modifying the returned map has no effect on the compiler.
**/
@:deprecated("Use Context.getLocalTVars() instead")
public static function getLocalVars() : haxe.ds.StringMap<Type> {
public static function getLocalVars() : Map<String,Type> {
return load("local_vars", 1)(false);
}

Expand All @@ -197,7 +197,7 @@ class Context {
of `Type`.
**/
@:require(haxe_ver >= 3.102)
public static function getLocalTVars() : haxe.ds.StringMap<Type.TVar> {
public static function getLocalTVars() : Map<String,Type.TVar> {
return load("local_vars", 1)(true);
}

Expand Down Expand Up @@ -234,7 +234,7 @@ class Context {
Modifying the returned map has no effect on the compiler.
*/
public static function getDefines() : haxe.ds.StringMap<String> {
public static function getDefines() : Map<String,String> {
return load("get_defines", 0)();
}

Expand Down Expand Up @@ -407,7 +407,7 @@ class Context {
Modifying the returned map has no effect on the compilation, use
`haxe.macro.Context.addResource` to add new resources to the compilation unit.
**/
public static function getResources():haxe.ds.StringMap<haxe.io.Bytes> {
public static function getResources():Map<String,haxe.io.Bytes> {
var x:haxe.ds.StringMap<neko.NativeString> = load("get_resources",0)();
var r = new haxe.ds.StringMap();
for (k in x.keys()) {
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/macro/Type.hx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ typedef EnumField = {
}

typedef EnumType = {> BaseType,
var constructs : haxe.ds.StringMap<EnumField>;
var constructs : Map<String,EnumField>;
var names : Array<String>;
}

Expand Down
2 changes: 1 addition & 1 deletion std/haxe/rtti/CType.hx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ typedef Enumdef = {> TypeInfos,

typedef Typedef = {> TypeInfos,
var type : CType;
var types : haxe.ds.StringMap<CType>; // by platform
var types : Map<String,CType>; // by platform
}

typedef Abstractdef = {> TypeInfos,
Expand Down
6 changes: 3 additions & 3 deletions std/haxe/web/Dispatch.hx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Redirect {
class Dispatch {

public var parts : Array<String>;
public var params : haxe.ds.StringMap<String>;
public var params : Map<String,String>;
public var name : String;
public var cfg : DispatchConfig;
var subDispatch : Bool;
Expand Down Expand Up @@ -135,7 +135,7 @@ class Dispatch {
}
}

public function redirect( url : String, ?params : haxe.ds.StringMap<String> ) {
public function redirect( url : String, ?params : Map<String,String> ) {
parts = url.split("/");
if( parts[0] == "" ) parts.shift();
if( params != null ) this.params = params;
Expand Down Expand Up @@ -459,7 +459,7 @@ class Dispatch {
return makeConfig(obj);
}

public static macro function run( url : ExprOf<String>, params : ExprOf<haxe.ds.StringMap<String>>, obj : ExprOf<{}> ) : ExprOf<Void> {
public static macro function run( url : ExprOf<String>, params : ExprOf<Map<String,String>>, obj : ExprOf<{}> ) : ExprOf<Void> {
var p = Context.currentPos();
var cfg = makeConfig(obj);
return { expr : ECall({ expr : EField({ expr : ENew({ name : "Dispatch", pack : ["haxe","web"], params : [], sub : null },[url,params]), pos : p },"runtimeDispatch"), pos : p },[cfg]), pos : p };
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/web/Request.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Request {
/**
Returns the current page GET and POST parameters (only GET parameters for Javascript)
**/
public static function getParams() : haxe.ds.StringMap<String> {
public static function getParams() : Map<String,String> {
#if neko
return neko.Web.getParams();
#elseif php
Expand Down
2 changes: 1 addition & 1 deletion std/java/_std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import sys.io.Process;
throw "Not implemented in this platform";
}

public static function environment() : haxe.ds.StringMap<String>
public static function environment() : Map<String,String>
{
if (_env != null)
return _env;
Expand Down
4 changes: 2 additions & 2 deletions std/neko/Web.hx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class Web {
Returns an hashtable of all Cookies sent by the client.
Modifying the hashtable will not modify the cookie, use setCookie instead.
**/
public static function getCookies():haxe.ds.StringMap<String> {
public static function getCookies():Map<String,String> {
var p = _get_cookies();
var h = new haxe.ds.StringMap<String>();
var k = "";
Expand Down Expand Up @@ -236,7 +236,7 @@ class Web {
Get the multipart parameters as an hashtable. The data
cannot exceed the maximum size specified.
**/
public static function getMultipart( maxSize : Int ) : haxe.ds.StringMap<String> {
public static function getMultipart( maxSize : Int ) : Map<String,String> {
var h = new haxe.ds.StringMap();
var buf : haxe.io.BytesBuffer = null;
var curname = null;
Expand Down
2 changes: 1 addition & 1 deletion std/neko/_std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
return new String(sys_exe_path());
}

public static function environment() : haxe.ds.StringMap<String> {
public static function environment() : Map<String,String> {
var l : Array<Dynamic> = sys_env();
var h = new haxe.ds.StringMap();
while( l != null ) {
Expand Down
2 changes: 1 addition & 1 deletion std/neko/vm/Loader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Loader {
but with different names, for example with two relatives paths reprensenting
the same file, since the cache is done on a by-name basic.
**/
public function getCache() : haxe.ds.StringMap<Module> {
public function getCache() : Map<String,Module> {
var h = new haxe.ds.StringMap<Module>();
var cache = untyped l.cache;
for( f in Reflect.fields(cache) )
Expand Down
2 changes: 1 addition & 1 deletion std/neko/vm/Module.hx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Module {
Each Module has an export table which can be useful to transfert
values between modules.
**/
public function getExports() : haxe.ds.StringMap<Dynamic> {
public function getExports() : Map<String,Dynamic> {
var h = new haxe.ds.StringMap();
var exp = _module_exports(m);
for( f in Reflect.fields(exp) )
Expand Down
2 changes: 1 addition & 1 deletion std/php/Lib.hx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Lib {
return untyped __call__("new _hx_array", a);
}

public static function hashOfAssociativeArray<T>(arr : NativeArray) : haxe.ds.StringMap<T> {
public static function hashOfAssociativeArray<T>(arr : NativeArray) : Map<String,T> {
var h = new haxe.ds.StringMap<T>();
untyped h.h = arr;
return h;
Expand Down
4 changes: 2 additions & 2 deletions std/php/Web.hx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class Web {
Returns an hashtable of all Cookies sent by the client.
Modifying the hashtable will not modify the cookie, use setCookie instead.
**/
public static function getCookies():haxe.ds.StringMap<String> {
public static function getCookies():Map<String,String> {
return Lib.hashOfAssociativeArray(untyped __php__("$_COOKIE"));
}

Expand Down Expand Up @@ -292,7 +292,7 @@ class Web {
Get the multipart parameters as an hashtable. The data
cannot exceed the maximum size specified.
**/
public static function getMultipart( maxSize : Int ) : haxe.ds.StringMap<String> {
public static function getMultipart( maxSize : Int ) : Map<String,String> {
var h = new haxe.ds.StringMap();
var buf : StringBuf = null;
var curname = null;
Expand Down
2 changes: 1 addition & 1 deletion std/php/_std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
return untyped __php__("$_SERVER['SCRIPT_FILENAME']");
}

public static function environment() : haxe.ds.StringMap<String> {
public static function environment() : Map<String,String> {
return php.Lib.hashOfAssociativeArray(untyped __php__("$_SERVER"));
}

Expand Down
2 changes: 1 addition & 1 deletion std/python/_std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Sys {
environ.set(s, v);
}

public static function environment() : haxe.ds.StringMap<String> {
public static function environment() : Map<String,String> {
return environ;
}

Expand Down
2 changes: 1 addition & 1 deletion std/sys/db/RecordInfos.hx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ typedef RecordInfos = {
var name : String;
var key : Array<String>;
var fields : Array<RecordField>;
var hfields : haxe.ds.StringMap<RecordField>;
var hfields : Map<String,RecordField>;
var relations : Array<RecordRelation>;
var indexes : Array<{ keys : Array<String>, unique : Bool }>;
}

0 comments on commit 5d7d358

Please sign in to comment.