1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.openssl: add manual .str() methods for C.SSL and C.SSL_CTX, fix a bug in the V auto str generation as well.

This commit is contained in:
Delyan Angelov
2023-02-08 12:52:00 +02:00
parent 522a9f5908
commit 36dc7faf2c
4 changed files with 26 additions and 1 deletions

View File

@ -1,5 +1,16 @@
import net.openssl
struct Abc {
x &C.SSL_CTX
}
fn test_printing_struct_with_reference_field_of_type_ssl_ctx() {
a := Abc{&C.SSL_CTX(123)}
dump(a)
sa := a.str()
assert sa.contains('&C.SSL_CTX(0x7b)')
}
fn test_openssl_compiles() {
assert openssl.is_used == 1
assert true