Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgen: cast 'vstring'.str to char * if it is the expected type #19827

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions vlib/net/mbedtls/mbedtls.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ fn C.mbedtls_entropy_free(&C.mbedtls_entropy_context)

fn C.mbedtls_ssl_config_defaults(&C.mbedtls_ssl_config, int, int, int) int

fn C.mbedtls_x509_crt_parse(&C.mbedtls_x509_crt, &char, int) int
fn C.mbedtls_pk_parse_key(&C.mbedtls_pk_context, &char, int, &char, int, voidptr, voidptr) int
fn C.mbedtls_x509_crt_parse(&C.mbedtls_x509_crt, &u8, int) int
fn C.mbedtls_pk_parse_key(&C.mbedtls_pk_context, &u8, int, &char, int, voidptr, voidptr) int
Comment on lines -166 to +167
Copy link
Member Author

@ttytm ttytm Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing this to use &u8 where types are declared as unsigned char * allows for green CI.

int mbedtls_pk_parse_key( mbedtls_pk_context *ctx,
const unsigned char *key, size_t keylen,
const unsigned char *pwd, size_t pwdlen,

fn C.mbedtls_x509_crt_parse_file(&C.mbedtls_x509_crt, &char) int
fn C.mbedtls_pk_parse_keyfile(&C.mbedtls_pk_context, &char, &char, voidptr, voidptr) int

Expand All @@ -188,8 +188,8 @@ fn C.mbedtls_ssl_set_bio(&C.mbedtls_ssl_context, &C.mbedtls_net_context, voidptr

fn C.mbedtls_ssl_handshake(&C.mbedtls_ssl_context) int

fn C.mbedtls_ssl_read(&C.mbedtls_ssl_context, &char, int) int
fn C.mbedtls_ssl_write(&C.mbedtls_ssl_context, &char, int) int
fn C.mbedtls_ssl_read(&C.mbedtls_ssl_context, &u8, int) int
fn C.mbedtls_ssl_write(&C.mbedtls_ssl_context, &u8, int) int

fn C.mbedtls_high_level_strerr(int) &char

Expand Down
Loading