Skip to content

Conversation

@madsodgaard
Copy link
Contributor

Per the forums thread, we decided to just use the underlying bit representation of any unsigned integral types. On top of that we then always use the @Unsigned annotation in JExtract, and remove the unsigned integers mode, since noone is really using wrap-guava.

Copy link
Collaborator

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

lgtm, nice to see code removal, we can always bring it back if we'd need to

case .wrapGuava: .wrapUnsignedGuava
}
}
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

lgtm on record that yeah i think we can remove this mode; if we'd ever want it back it'll be easy to bring back from past commits

public func getJNIValue(in environment: JNIEnvironment) -> JNIType {
// On 32-bit, standard JDK jlong is defined as long long = Int64
// On 64-bit, standard JDK jlong is defined as long = Int
// On Android it's correctly marked as int64_t
Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment could be clearer about the "why" this is ok: is it because it is 64bit on all Android versions we're supporting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the docs, is that better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks that makes more sense

@ktoso ktoso changed the title jextract: remove unsigned integers mode jextract: remove unsigned integers mode, remove wrap-guava mode Dec 8, 2025
@ktoso ktoso merged commit 0eefeab into swiftlang:main Dec 8, 2025
48 checks passed
@madsodgaard madsodgaard deleted the unsigned-unification branch December 9, 2025 08:22
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.

2 participants