C++ support: codegen generates C++'s references and avoids copies
This commit is contained in:
parent
a400e8f7f3
commit
e75e421912
7 changed files with 156 additions and 101 deletions
|
|
@ -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.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue