diff options
-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 {. |