Merge pull request #6200 from jangko/fix6196

fixes #6196
This commit is contained in:
Dominik Picheta
2017-08-10 20:35:02 +01:00
committed by GitHub

View File

@@ -172,7 +172,7 @@ elif defined(vcc) and hasThreadSupport:
header: "<intrin.h>".}
else:
proc addAndFetch*(p: ptr int, val: int): int {.
importcpp: "_InterlockedExchangeAdd(static_cast<NI volatile *>(#), #)",
importcpp: "_InterlockedExchangeAdd(reinterpret_cast<LONG volatile *>(#), static_cast<LONG>(#))",
header: "<intrin.h>".}
else:
when sizeof(int) == 8: