remove unnecessary data in callbacks (and weird cast) (#29)

This commit is contained in:
Jacek Sieka 2021-01-07 10:32:46 +01:00 committed by GitHub
parent af9611c187
commit 23bf71889d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -150,9 +150,9 @@ proc init(T: type SkContext): T =
let flags = cuint(SECP256K1_CONTEXT_VERIFY or SECP256K1_CONTEXT_SIGN)
result.context = secp256k1_context_create(flags)
secp256k1_context_set_illegal_callback(
result.context, illegalCallback, cast[pointer](result))
result.context, illegalCallback, nil)
secp256k1_context_set_error_callback(
result.context, errorCallback, cast[pointer](result))
result.context, errorCallback, nil)
func getContext(): ptr secp256k1_context =
## Get current `EccContext`