Skip to content

Commit

Permalink
decrease required go version to 1.12
Browse files Browse the repository at this point in the history
The error occurs when trying to build the library using go < 1.16:
./alloc.go:14:10: unrecognized Go type _Ctype_void
./alloc.go:16:21: unrecognized Go type _Ctype_void

This is an unnecessary restriction. It can be fixed by replacing
*C.void with unsafe.Pointer (as it is already done for `ptr` argument of
CRYPTO_EX_free[1][2]).

1. https://www.openssl.org/docs/manmaster/man3/SSL_get_ex_new_index.html
2. https://www.openssl.org/docs/man3.0/man3/CRYPTO_EX_free.html

Related to libp2p#18
  • Loading branch information
oleg-jukovec committed May 31, 2022
1 parent 0fadeb4 commit a8e2e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions alloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

//export go_ssl_crypto_ex_free
func go_ssl_crypto_ex_free(
parent *C.void, ptr unsafe.Pointer,
parent unsafe.Pointer, ptr unsafe.Pointer,
cryptoData *C.CRYPTO_EX_DATA, idx C.int,
argl C.long, argp *C.void,
argl C.long, argp unsafe.Pointer,
) {
pointer.Unref(ptr)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ require (
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb // indirect
)

go 1.16
go 1.12

0 comments on commit a8e2e95

Please sign in to comment.