Browse Source

[cpp] Remap the INT_ constants

Hugh 10 years ago
parent
commit
12a0daaddf
2 changed files with 3 additions and 1 deletions
  1. 2 0
      gencpp.ml
  2. 1 1
      main.ml

+ 2 - 0
gencpp.ml

@@ -319,6 +319,8 @@ let keyword_remap name =
    | "bool" | "const_cast" | "dynamic_cast" | "explicit" | "export" | "mutable" | "namespace"
    | "bool" | "const_cast" | "dynamic_cast" | "explicit" | "export" | "mutable" | "namespace"
    | "reinterpret_cast" | "static_cast" | "typeid" | "typename" | "virtual"
    | "reinterpret_cast" | "static_cast" | "typeid" | "typename" | "virtual"
    | "_Complex" | "INFINITY" | "NAN"
    | "_Complex" | "INFINITY" | "NAN"
+   | "INT_MIN" | "INT_MAX" | "INT8_MIN" | "INT8_MAX" | "UINT8_MAX" | "INT16_MIN"
+   | "INT16_MAX" | "UINT16_MAX" | "INT32_MIN" | "INT32_MAX" | "UINT32_MAX"
    | "struct" -> "_" ^ name
    | "struct" -> "_" ^ name
    | "asm" -> "_asm_"
    | "asm" -> "_asm_"
    | x -> x
    | x -> x

+ 1 - 1
main.ml

@@ -998,7 +998,7 @@ try
 	let swf_version = ref false in
 	let swf_version = ref false in
 	let evals = ref [] in
 	let evals = ref [] in
 	Common.define_value com Define.HaxeVer (float_repres (float_of_int version /. 1000.));
 	Common.define_value com Define.HaxeVer (float_repres (float_of_int version /. 1000.));
-	Common.define_value com Define.HxcppApiLevel "320";
+	Common.define_value com Define.HxcppApiLevel "321";
 	Common.raw_define com "haxe3";
 	Common.raw_define com "haxe3";
 	Common.define_value com Define.Dce "std";
 	Common.define_value com Define.Dce "std";
 	com.warning <- (fun msg p -> message ctx ("Warning : " ^ msg) p);
 	com.warning <- (fun msg p -> message ctx ("Warning : " ^ msg) p);