4
votes

What are the correct JNA mappings of the C types uint8_t and int8_t? Thank you!

1

1 Answers

4
votes

The only 8-bit integer data type in Java is byte, so you would use that. Unfortunately it is signed, so uint8_t values over 127 will be seen as negative when converted into Java byte. This is not really a problem because the stored bits are the same.