From 8cb8720b567c6bcb261bd1c0f7491bdb5209ad06 Mon Sep 17 00:00:00 2001 From: ee7 <45465154+ee7@users.noreply.github.com> Date: Fri, 15 Jan 2021 07:30:01 +0100 Subject: [PATCH] Fix error with styleCheck Before this commit, running `nim c --styleCheck:error` on a file that imports the `uuids` package would produce an error on Windows. `WINBOOL` is defined here: https://github.com/nim-lang/Nim/blob/52cf7280019c/lib/windows/winlean.nim#L33 Fixes: #5 --- uuids.nimble | 2 +- uuids/urandom.nim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/uuids.nimble b/uuids.nimble index 98eaf59..ccc6e86 100644 --- a/uuids.nimble +++ b/uuids.nimble @@ -1,6 +1,6 @@ [Package] name: "uuids" -version: "0.1.10" +version: "0.1.11" author: "Xored Software, Inc." description: "UUID library" license: "MIT" diff --git a/uuids/urandom.nim b/uuids/urandom.nim index 3666214..6078de4 100644 --- a/uuids/urandom.nim +++ b/uuids/urandom.nim @@ -16,16 +16,16 @@ when defined(windows): proc CryptAcquireContext( phProv: ptr HCRYPTPROV, pszContainer: WideCString, pszProvider: WideCString, dwProvType: DWORD, dwFlags: DWORD - ): WinBool {.importc: "CryptAcquireContextW".} + ): WINBOOL {.importc: "CryptAcquireContextW".} else: proc CryptAcquireContext( phProv: ptr HCRYPTPROV, pszContainer: cstring, pszProvider: cstring, dwProvType: DWORD, dwFlags: DWORD - ): WinBool {.importc: "CryptAcquireContextA".} + ): WINBOOL {.importc: "CryptAcquireContextA".} proc CryptGenRandom( hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: pointer - ): WinBool {.importc: "CryptGenRandom".} + ): WINBOOL {.importc: "CryptGenRandom".} {.pop.}