On Tue, 21 Mar 2023 08:57:42 GMT, Per Minborg <pminb...@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

Reply via email to