Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src-json/define.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
"platforms": ["cpp"]
},
{
"name": "HxcppSmartStings",
"name": "HxcppSmartStrings",
"define": "hxcpp-smart-strings",
"doc": "Use wide strings in hxcpp. (Turned on by default unless `-D disable-unicode-strings` is specified.)",
"platforms": ["cpp"]
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ let parse_args com =
end;
with Not_found ->
raise (Arg.Bad new_msg));
if com.platform = Globals.Cpp && not (Define.defined com.defines DisableUnicodeStrings) && not (Define.defined com.defines HxcppSmartStings) then begin
Define.define com.defines HxcppSmartStings;
if com.platform = Globals.Cpp && not (Define.defined com.defines DisableUnicodeStrings) && not (Define.defined com.defines HxcppSmartStrings) then begin
Define.define com.defines HxcppSmartStrings;
end;
if Define.raw_defined com.defines "gen_hx_classes" then begin
(* TODO: this is something we're gonna remove once we have something nicer for generating flash externs *)
Expand Down
2 changes: 1 addition & 1 deletion src/generators/cpp/cppStrings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let strq ctx s =
else "(" ^ split s "" ^ ")"
in

if Gctx.defined ctx Define.HxcppSmartStings && has_utf8_chars s then (
if Gctx.defined ctx Define.HxcppSmartStrings && has_utf8_chars s then (
let b = Buffer.create 0 in

let add ichar =
Expand Down
4 changes: 2 additions & 2 deletions src/generators/gencpp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ let write_build_data common_ctx filename classes main_deps boot_deps build_extra
output_string buildfile ("<set name=\"HAXE_OUTPUT\" value=\"" ^ exe_name ^ "\" />\n");
output_string buildfile "<include name=\"${HXCPP}/build-tool/BuildCommon.xml\"/>\n";
output_string buildfile build_extra;
if (Gctx.defined common_ctx Define.HxcppSmartStings) then
output_string buildfile ("<error value=\"Hxcpp is out of date - please update\" unlessApi=\"" ^ api_string ^ "\" />\n");
if (Gctx.defined common_ctx Define.HxcppSmartStrings) then
output_string buildfile ("<error value=\"Hxcpp is out of date - please update, and/or rebuild your build tools\" unlessApi=\"" ^ api_string ^ "\" />\n");
output_string buildfile "</xml>\n";
close_out buildfile

Expand Down
Loading