Skip to content

Clarify mapping of i8 to C char #24009

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

Open
mardy opened this issue Mar 22, 2025 · 1 comment
Open

Clarify mapping of i8 to C char #24009

mardy opened this issue Mar 22, 2025 · 1 comment
Labels
Unit: Documentation Bugs/feature requests, that are related to the documentations.

Comments

@mardy
Copy link

mardy commented Mar 22, 2025

Describe the issue

The documentation says:

A V i8 is equivalent to C char, or int8_t.

I'm new to V, so I don't really know if this is a bug in the documentation or in V itself, but this mapping would be wrong: char is not guaranteed to be signed (on PowerPC it's unsigned), so the correct mapping would be to signed char.

Links

https://github.com/vlang/v/blob/master/doc/c_and_v_type_interoperability.md

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@mardy mardy added the Unit: Documentation Bugs/feature requests, that are related to the documentations. label Mar 22, 2025
Copy link

Connected to Huly®: V_0.6-22402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unit: Documentation Bugs/feature requests, that are related to the documentations.
Projects
None yet
Development

No branches or pull requests

1 participant