Explorar o código

added neko.Web.isTora

Nicolas Cannasse %!s(int64=15) %!d(string=hai) anos
pai
achega
df6939bf63
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 1 0
      doc/CHANGES.txt
  2. 3 0
      std/neko/Web.hx

+ 1 - 0
doc/CHANGES.txt

@@ -31,6 +31,7 @@
 	all : bugfix when optimizing (function(x) return x)(x)
 	neko : improved speed of Xml.toString()
 	all : added -D dump (for debugging purposes)
+	neko : added neko.Web.isTora
 
 2009-07-26: 2.04
 	flash9 : fixed get_full_path error with -D fdb

+ 3 - 0
std/neko/Web.hx

@@ -296,6 +296,7 @@ class Web {
 	}
 
 	public static var isModNeko(default,null) : Bool;
+	public static var isTora(default,null) : Bool;
 
 	static var _set_main : Dynamic;
 	static var _get_host_name : Dynamic;
@@ -343,6 +344,7 @@ class Web {
 			_flush = Lib.loadLazy(lib,"cgi_flush",0);
 			_get_client_headers = Lib.loadLazy(lib,"get_client_headers",0);
 			_log_message = Lib.loadLazy(lib,"log_message",1);
+			isTora = try Lib.load(lib,"tora_infos",0) != null catch( e : Dynamic) false;
 		} else {
 			var a0 = untyped __dollar__loader.args[0];
 			if( a0 != null ) a0 = new String(a0);
@@ -379,6 +381,7 @@ class Web {
 			_parse_multipart = function(a,b) { throw "Not supported"; };
 			_flush = function() { };
 			_log_message = function(s) { };
+			isTora = false;
 		}
 	}