瀏覽代碼

define haxe_(cur version) and the two last other one of the same major build

Nicolas Cannasse 13 年之前
父節點
當前提交
64126a20b6
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      main.ml

+ 4 - 1
main.ml

@@ -640,7 +640,10 @@ try
 	let force_typing = ref false in
 	let pre_compilation = ref [] in
 	let interp = ref false in
-	Common.define com ("haxe_" ^ string_of_int version);
+	for i = 0 to 2 do
+		let v = version - i in
+		if v / 100 = version / 100 then Common.define com ("haxe_" ^ string_of_int version);
+	done;
 	com.warning <- (fun msg p -> message ctx ("Warning : " ^ msg) p);
 	com.error <- error ctx;
 	Parser.display_error := (fun e p -> com.error (Parser.error_msg e) p);