From 6f0cab7060daa5cf1aa47d019d3e24a4e9453c15 Mon Sep 17 00:00:00 2001 From: Konstantin Zaitsev Date: Sun, 28 Feb 2016 17:25:12 +0600 Subject: [PATCH] Added checks for CPP --- lib/pure/dynlib.nim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/pure/dynlib.nim b/lib/pure/dynlib.nim index 8da422ffba..906a9d23ee 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: "", stdcall.} proc winLoadLibrary(path: cstring): THINSTANCE {.