mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
flag,json,net: handle C calls in .v files (part of enabling -W impure-v
as default) (#19779)
This commit is contained in:
parent
1e25d45243
commit
01022e918e
21 changed files with 50 additions and 50 deletions
17
vlib/net/openssl/openssl_compiles_test.c.v
Normal file
17
vlib/net/openssl/openssl_compiles_test.c.v
Normal file
|
@ -0,0 +1,17 @@
|
|||
import net.openssl
|
||||
|
||||
struct Abc {
|
||||
x &C.SSL_CTX
|
||||
}
|
||||
|
||||
fn test_printing_struct_with_reference_field_of_type_ssl_ctx() {
|
||||
a := unsafe { 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue