[foreign-preview] Integrated: 8282211: SegmentAllocator array factories should use varargs
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Mar 8 08:43:25 UTC 2022
On Mon, 7 Mar 2022 14:18:57 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This is a trivial patch which replaces array parameter types in `SegmentAllocator::allocateArray` methods with varargs ones.
> This makes very trivial use cases of the API more compact and succint, as in:
>
>
> MemorySegment segment = allocator.allocateArray(JAVA_INT, 1, 2, 3);
>
>
> Of course in the general (and more common) case, passing arrays is still possible.
This pull request has now been integrated.
Changeset: 1f3c7343
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.java.net/panama-foreign/commit/1f3c7343907bf9e57ef1fa2f5082ca726f09e579
Stats: 21 lines in 1 file changed: 0 ins; 0 del; 21 mod
8282211: SegmentAllocator array factories should use varargs
Reviewed-by: psandoz
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/664
More information about the panama-dev
mailing list