diff options
author | Araq <rumpf_a@web.de> | 2015-02-03 13:21:05 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-04 00:52:45 +0100 |
commit | e75e4219121e9120edc4c53eef6af46de9c6eb50 (patch) | |
tree | e98b6c525845988b3797ead0638cdd8731eb9e4e /lib/system | |
parent | a400e8f7f39b1bb29245323c6d999f01b46f22c3 (diff) | |
download | Nim-e75e4219121e9120edc4c53eef6af46de9c6eb50.tar.gz |
C++ support: codegen generates C++'s references and avoids copies
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/dyncalls.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/system/dyncalls.nim b/lib/system/dyncalls.nim index e0d99cf88..aab2a7b61 100644 --- a/lib/system/dyncalls.nim +++ b/lib/system/dyncalls.nim @@ -80,8 +80,13 @@ elif defined(windows) or defined(dos): # Native Windows Implementation # ======================================================================= # - type - THINSTANCE {.importc: "HINSTANCE".} = pointer + when defined(cpp): + type + THINSTANCE {.importc: "HINSTANCE".} = object + x: pointer + else: + type + THINSTANCE {.importc: "HINSTANCE".} = pointer proc freeLibrary(lib: THINSTANCE) {. importc: "FreeLibrary", header: "<windows.h>", stdcall.} |