RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v5]

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Mar 21 09:56:53 UTC 2023


On Tue, 21 Mar 2023 08:57:42 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/foreign/Linker.java line 621:
>> 
>>> 619:          *          to a downcall handle linked with {@link #captureCallState(String...)}}
>>> 620:          *
>>> 621:          * @see #captureCallState(String...)
>> 
>> How does a caller know what the structure may contain? Should we document the platform specific structures?
>
> I've added an example of how to print the platform-dependent structure. Should we document anyhow?

I'm not sure about this. Honestly, the example probably doesn't help much if somebody didn't get the idea of what the layout might be. I think it might be better to say something like, `on Windows/x64 the returned layout might be as follows...` and then you write the code to create the layout instance corresponding to the returned layout. But we have to be careful to make the text non-normative (as the set of values might change).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13079#discussion_r1143125997



More information about the build-dev mailing list