diff options
author | Konstantin Zaitsev <konstantin.zaitsev@xored.com> | 2016-02-28 17:25:12 +0600 |
---|---|---|
committer | Konstantin Zaitsev <konstantin.zaitsev@xored.com> | 2016-02-28 17:25:12 +0600 |
commit | 6f0cab7060daa5cf1aa47d019d3e24a4e9453c15 (patch) | |
tree | 5398769a917fb7793be13a7f8e0d406c7a03f09a | |
parent | 26931798349e2f1d495ad55b27f5f1124a7bdb7e (diff) | |
download | Nim-6f0cab7060daa5cf1aa47d019d3e24a4e9453c15.tar.gz |
Added checks for CPP
-rw-r--r-- | lib/pure/dynlib.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/pure/dynlib.nim b/lib/pure/dynlib.nim index 8da422ffb..906a9d23e 100644 --- a/lib/pure/dynlib.nim +++ b/lib/pure/dynlib.nim @@ -78,9 +78,13 @@ elif defined(windows) or defined(dos): # Native Windows Implementation # ======================================================================= # - type - THINSTANCE {.importc: "HINSTANCE".} = object - x: pointer + when defined(cpp): + type + THINSTANCE {.importc: "HINSTANCE".} = object + x: pointer + else: + type + THINSTANCE {.importc: "HINSTANCE".} = pointer proc FreeLibrary(lib: THINSTANCE) {.importc, header: "<windows.h>", stdcall.} proc winLoadLibrary(path: cstring): THINSTANCE {. |