fix windows build

This commit is contained in:
Dmitriy Ryajov 2022-03-26 18:15:18 -06:00
parent 6821b5fa6f
commit 05e62a3e4c
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -22,13 +22,13 @@ let
LeoAlignBytes* = if hasAvx2(): 32'u else: 16'u
when defined(windows):
proc alignedAlloc(alignment, size: csize_t): pointer =
alignedAllocWindows(size, alignment)
proc alignedAllocWindows(size, alignment: csize_t): pointer
{.importc: "_aligned_malloc", header: "<malloc.h>".}
# Beware of the arg order!
proc alignedAlloc(alignment, size: csize_t): pointer =
alignedAllocWindows(size, alignment)
proc alignedFree*[T](p: ptr T)
{.importc: "_aligned_free", header: "<malloc.h>".}
elif defined(osx):