x/mobile/bind: support slices of structs - #101
Conversation
Adds code generation for supporting slices of structs in gobind. Fixes golang/go#13445 NOTE: This PR isn't quite done yet, I'm having some trouble getting the testing environment set up. It seems like the default test environment is a bit outdated? In any case, could I use this PR's CI to iterate on test failures? Open to other suggestions as well.
|
This PR (HEAD: 8ba93b9) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/mobile/+/583196. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/583196. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/583196. |
|
Message from Kevin Wang: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/583196. |
|
This PR (HEAD: 19dd1fc) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/mobile/+/583196. Important tips:
|
Slices of pointers to bound structs, such as
[]*S, are now supportedas parameters, results and struct fields. They cross the language
barrier as slices of reference numbers, so Java sees
S[]andObjective-C sees
NSArray<S*>*.Unlike byte slices, which are passed by reference, the elements are
converted one by one; mutating the slice on one side does not affect
the other. A nil slice maps to a null array and an empty slice to an
empty array, and a nil element maps to null in Java and NSNull in
Objective-C.
Fixes golang/go#13445