Fix for styleCheck:usages (#34)
This commit is contained in:
parent
d790c42206
commit
153ec71a34
|
@ -317,7 +317,7 @@ func fromRaw*(T: type SkSignature, data: openArray[byte]): SkResult[T] =
|
|||
|
||||
ok(T(data: sig))
|
||||
|
||||
func fromDer*(T: type SkSignature, data: openarray[byte]): SkResult[T] =
|
||||
func fromDer*(T: type SkSignature, data: openArray[byte]): SkResult[T] =
|
||||
## Initialize Secp256k1 `signature` ``sig`` from DER
|
||||
## representation ``data``.
|
||||
if len(data) < 1:
|
||||
|
@ -341,7 +341,7 @@ func toRaw*(sig: SkSignature): array[SkRawSignatureSize, byte] =
|
|||
secp256k1_context_no_precomp, result.ptr0, unsafeAddr sig.data)
|
||||
doAssert res == 1, "Can't fail, per documentation"
|
||||
|
||||
func toDer*(sig: SkSignature, data: var openarray[byte]): int =
|
||||
func toDer*(sig: SkSignature, data: var openArray[byte]): int =
|
||||
## Serialize Secp256k1 `signature` ``sig`` to raw binary form and store it
|
||||
## to ``data``.
|
||||
##
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mode = ScriptMode.Verbose
|
||||
|
||||
packageName = "secp256k1"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
author = "Status Research & Development GmbH"
|
||||
description = "A wrapper for the libsecp256k1 C library"
|
||||
license = "Apache License 2.0"
|
||||
|
@ -18,7 +18,7 @@ proc test(env, path: string) =
|
|||
lang = getEnv"TEST_LANG"
|
||||
|
||||
exec "nim " & lang & " " & env &
|
||||
" -r -f --hints:off --skipParentCfg " & path
|
||||
" -r -f --hints:off --styleCheck:usages --styleCheck:error --skipParentCfg " & path
|
||||
|
||||
task test, "Tests":
|
||||
test "--threads:on", "tests/all_tests"
|
||||
|
|
|
@ -8,13 +8,13 @@ const
|
|||
srcPath = internalPath & "/src"
|
||||
secpSrc = srcPath & "/secp256k1.c"
|
||||
|
||||
{.passC: "-I" & quoteShell(wrapperPath).}
|
||||
{.passC: "-I" & quoteShell(internalPath).}
|
||||
{.passC: "-I" & quoteShell(srcPath).}
|
||||
{.passC: "-DHAVE_CONFIG_H".}
|
||||
{.passc: "-I" & quoteShell(wrapperPath).}
|
||||
{.passc: "-I" & quoteShell(internalPath).}
|
||||
{.passc: "-I" & quoteShell(srcPath).}
|
||||
{.passc: "-DHAVE_CONFIG_H".}
|
||||
|
||||
when defined(gcc) or defined(clang):
|
||||
{.passC: "-DHAVE_BUILTIN_EXPECT"}
|
||||
{.passc: "-DHAVE_BUILTIN_EXPECT"}
|
||||
|
||||
{.compile: secpSrc.}
|
||||
|
||||
|
|
Loading…
Reference in New Issue