Move MemoryAddress::copy (jextract version) #171
Conversation
|
Webrevs
|
@@ -25,7 +25,7 @@ public class C-X { | |||
|
|||
private static void copy(MemoryAddress addr, ${CARRIER}[] arr) { | |||
var heapSegment = MemorySegment.ofArray(arr); | |||
MemoryAddress.copy(heapSegment.baseAddress(), addr, arr.length * sizeof()); | |||
addr.segment().copyFrom(heapSegment); |
JornVernee
May 15, 2020
Member
The behavior is not necessarily the same if addr
is not the base address of the segment. I think the right move here is to change the parameter from MemoryAddress to MemorySegment (same for Cstring).
The behavior is not necessarily the same if addr
is not the base address of the segment. I think the right move here is to change the parameter from MemoryAddress to MemorySegment (same for Cstring).
@mcimadamore This change now passes all automated pre-integration checks, type
Since the source branch of this PR was last updated there have been 3 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge
|
/integrate |
@mcimadamore The following commits have been pushed to foreign-jextract since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit 6011a8c. |
This patch addresses the remaining issues with jextrct templating mentioning the old MemoryAddress:copy method.
Progress
Reviewers
Download
$ git fetch https://git.openjdk.java.net/panama-foreign pull/171/head:pull/171
$ git checkout pull/171