[foreign-memaccess+abi] RFR: 8312059: Clarify the documention for variadic functions [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Jul 14 17:43:04 UTC 2023


On Fri, 14 Jul 2023 17:32:41 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/foreign/Linker.java line 436:
>> 
>>> 434:  * extension should take place. However, since passing an argument of a non-promoted type as a variadic argument is not
>>> 435:  * supported in C, the native linker will reject an attempt to link a specialized function descriptor with any variadic
>>> 436:  * argument layouts corresponding to a non-promoted C type. Since the size of the C {@code int} type is platform-specific,
>> 
>> This is slightly imprecise - although I know what you mean - it does seem to imply that if I pass a struct layout it will be rejected.
>
> I thought saying "non-promoted" would be easier to understand than "a type that would undergo default argument promotion in C"

we can say "variadic argument _value_ layout corresponding to..."

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

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/846#discussion_r1263978184


More information about the panama-dev mailing list