Explorar o código

Merge pull request #2287 from andyli/old-browser

naming convention: -D oldBrowser => -D old-browser
Nicolas Cannasse %!s(int64=12) %!d(string=hai) anos
pai
achega
ff57cd2480
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 1 1
      doc/CHANGES.txt
  2. 3 3
      std/haxe/Json.hx

+ 1 - 1
doc/CHANGES.txt

@@ -18,7 +18,7 @@
 	js : window and console are reserved words. Access them with __js__ instead of untyped.
 	js : added -D js-flatten
 	js : improved inlining
-	js : always use JSON extern (compile with -D oldBrowser to disable)
+	js : always use JSON extern (compile with -D old-browser to disable)
 	cpp : improved side-effect detection
 	macro : allowed $v{(c:Float|Int|String)}
 	macro : resolve error line number in external files

+ 3 - 3
std/haxe/Json.hx

@@ -26,12 +26,12 @@ package haxe;
 	Use -D haxeJSON to force usage of the Haxe implementation even if a native API is found : this will provide
 	extra encoding features such as enums (replaced by their index), Hashs and Iterable.
 **/
-#if ((flash11 || (js && !oldBrowser)) && !haxeJSON)
+#if ((flash11 || (js && !old_browser)) && !haxeJSON)
 @:native('JSON') extern
 #end
 class Json {
 
-#if (haxeJSON || !(flash11 || (js && !oldBrowser)))
+#if (haxeJSON || !(flash11 || (js && !old_browser)))
 	var buf : #if flash9 flash.utils.ByteArray #else StringBuf #end;
 	var str : String;
 	var pos : Int;
@@ -421,7 +421,7 @@ class Json {
 	}
 
 	#if !haxeJSON
-		#if (js && oldBrowser)
+		#if (js && old_browser)
 		static function __init__() untyped {
 			if( __js__('typeof(JSON)') != 'undefined' )
 				Json = __js__('JSON');