-
Notifications
You must be signed in to change notification settings - Fork 87
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
Unsigned types are not generated correct #23
Comments
Hm. I feel like representing an unsigned 32-bit integer as an Maybe we just need better documentation for the current behavior? |
With the current implementation the unsigned types have no meaning in Java. It's a nasty pitfall if you get negative values where it should be impossible only by missing to do the conversion yourself. I think it is very common to express unsigned values with the next higher type, especially for UInt8 and UInt16. |
Hey guys, is there any update on this? |
remove unused import
We make use of the library jOOU to make working with unsigned integers easier, but it would be cool if we could have a codegen option for capnproto-java to generate these for us. |
I am curious whether there has been some advancement on this? We implemented custom |
Since Java does not have unsigned primitive types the generated type for UInt8, UInt16, UInt32 must be short, int, long instead of byte, short, int. For UInt64 is no real solution available but here is the impact not as big as for the smaller types.
The text was updated successfully, but these errors were encountered: