Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8310967

Get promoted types for foreign variadic function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 22
    • 21
    • core-libs
    • None

      java.lang.foreign.Linker documentation mentions about the need for using the promoted types in FunctionDescriptor for a downcall to foreign variadic function. Since the set of promoted types are platform specific, it's impossible to write portable code without an essential API.
      Essential API is of the form:
      Class/MemoryLayout[] getSupportedVariadicTypes(); (Linker class)

      Linker.nativeLinker().getSupportedVariadicTypes() can be used to create an acceptable FunctionDescriptor

            jvernee Jorn Vernee
            pgundarlahal Prashanthram Gundarlahally
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: