Skip to content

WIP: Prepare Unsigned integer types for SwiftKit #312

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ktoso
Copy link
Collaborator

@ktoso ktoso commented Jul 13, 2025

Using these we'll be able to use them to more safely express unsigned types, rather than just pretend it's all the same and fine when we import them into signed java types.

We'll also be able to offer extract mode that can just ignore this and extract as raw int/long etc, but these APIs may be safer

@ktoso ktoso marked this pull request as draft July 13, 2025 11:16
* @param bits bit value to store in this unsigned integer
* @return unsigned integer representation of the passed in value
*/
public static UnsignedByte representedByBitsOf(byte bits) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: benchmark if it's worth it

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

Successfully merging this pull request may close these issues.

1 participant