diff options
author | Araq <rumpf_a@web.de> | 2015-02-06 21:26:40 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-07 10:48:07 +0100 |
commit | e84834db79854c6ccc89263ec20d3749b8a87a05 (patch) | |
tree | 4232d1e7638c232eded8c6a1f3d82120f272d586 /lib/pure | |
parent | d020ad097c7f1e8155c6b6e7bafbf7731caaafe8 (diff) | |
download | Nim-e84834db79854c6ccc89263ec20d3749b8a87a05.tar.gz |
lots of C++ codegen improvements
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/os.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 147614d3d..f01343673 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1074,8 +1074,12 @@ when defined(windows): # because we support Windows GUI applications, things get really # messy here... when useWinUnicode: - proc strEnd(cstr: WideCString, c = 0'i32): WideCString {. - importc: "wcschr", header: "<string.h>".} + when defined(cpp): + proc strEnd(cstr: WideCString, c = 0'i32): WideCString {. + importcpp: "(NI16*)wcschr((const wchar_t *)#, #)", header: "<string.h>".} + else: + proc strEnd(cstr: WideCString, c = 0'i32): WideCString {. + importc: "wcschr", header: "<string.h>".} else: proc strEnd(cstr: cstring, c = 0'i32): cstring {. importc: "strchr", header: "<string.h>".} |