-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
net: use char types that resemble C API of mbedtls more closely #19837
Conversation
The whole file needs to be reviewed and fixed; perhaps it was written before the introduction of the |
Thanks a lot for the review @spytheman! You are right all your suggestions should be implemented. It was just the char types that became obvious to me. I'll also go through the whole file later that day to have another pair of eyes on it. |
78a5e11
to
b04a1df
Compare
First of the two new commits does the fixing, the second just organizing. |
d335f56
to
44e76bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work.
🤖 Generated by Copilot at 707357f
Updated the net/mbedtls module to use
&u8
instead of&char
for byte parameters. This avoids unnecessary casting and aligns with V's byte type.🤖 Generated by Copilot at 707357f
mbedtls_x509_crt_parse
,mbedtls_pk_parse_key
,mbedtls_net_connect
,mbedtls_ssl_read
, andmbedtls_ssl_write
to use&u8
instead of&char
for byte array parameters (link, link). This improves the compatibility and correctness of the V bindings for the mbedtls C library invlib/net/mbedtls/mbedtls.c.v
.