mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
openssl: add unsafe blocks to int -> enum blocks (#15957)
This commit is contained in:
parent
dc2ba1c33f
commit
9fc64de94b
@ -3,7 +3,7 @@ module openssl
|
|||||||
// ssl_error returns non error ssl code or error if unrecoverable and we should panic
|
// ssl_error returns non error ssl code or error if unrecoverable and we should panic
|
||||||
fn ssl_error(ret int, ssl voidptr) ?SSLError {
|
fn ssl_error(ret int, ssl voidptr) ?SSLError {
|
||||||
res := C.SSL_get_error(ssl, ret)
|
res := C.SSL_get_error(ssl, ret)
|
||||||
match SSLError(res) {
|
match unsafe { SSLError(res) } {
|
||||||
.ssl_error_syscall {
|
.ssl_error_syscall {
|
||||||
return error_with_code('unrecoverable syscall ($res)', res)
|
return error_with_code('unrecoverable syscall ($res)', res)
|
||||||
}
|
}
|
||||||
@ -11,7 +11,7 @@ fn ssl_error(ret int, ssl voidptr) ?SSLError {
|
|||||||
return error_with_code('unrecoverable ssl protocol error ($res)', res)
|
return error_with_code('unrecoverable ssl protocol error ($res)', res)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return SSLError(res)
|
return unsafe { SSLError(res) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user