jextract: support typed unsafepointer/unsafebufferpointer in FFM and JNI generators - #904
Open
Tatenda-k wants to merge 2 commits into
Open
jextract: support typed unsafepointer/unsafebufferpointer in FFM and JNI generators#904Tatenda-k wants to merge 2 commits into
Tatenda-k wants to merge 2 commits into
Conversation
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 25, 2026
ktoso
left a comment
Collaborator
There was a problem hiding this comment.
Pretty good work! Almost there 👍
Please add runtime tests by adding functions returning such buffers to Samples/SwiftJavaExtractJNISampleApp/Sources/MySwiftLibrary and then adding tests in Java using them in Samples/SwiftJavaExtractJNISampleApp/src/test/java
Collaborator
|
Also same tests in FFM since we claim to support it now |
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 25, 2026
ktoso
reviewed
Aug 27, 2026
ktoso
reviewed
Aug 27, 2026
| public func bufferCount(data: UnsafeRawBufferPointer) -> Int64 { | ||
| Int64(data.count) | ||
| } | ||
| // snippet.end |
Collaborator
There was a problem hiding this comment.
This would break existing snippets
Tatenda-k
force-pushed
the
jextract-pointer-support
branch
from
August 27, 2026 22:34
22d7ddd to
ba02d62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support for
case .unsafePointer, .unsafeMutablePointer,case .unsafePointer, .unsafeMutablePointer, andcase .unsafeBufferPointer, .unsafeMutableBufferPointerfor FFM and JNI.#840