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

[Feature request] Please add 8 and 16 bit ints for io_variants #68

Open
trsh opened this issue Jul 31, 2024 · 1 comment
Open

[Feature request] Please add 8 and 16 bit ints for io_variants #68

trsh opened this issue Jul 31, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@trsh
Copy link

trsh commented Jul 31, 2024

8 -> signed char
16 -> signed short

@begla begla self-assigned this Jul 31, 2024
@begla begla added the enhancement New feature or request label Jul 31, 2024
@Danchyg1337
Copy link

Instead of creating a new issue, I will add to this one as it's similar.

There are functions to recieve variant from uint16/32/64 but only one function to recieve int32.
It may cause unintentional problems when creating int components with types like io_int16_t*
as then, after accessing the data with [] operator, the data gets read with a wrong stride
const io_int16_t type = comp_type[i];

Two components both with value 1 turn into 1st component being 1 and 2nd being 0.
image

Just to avoid future problems like this, I propose adding io_variant_from_int* as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants