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

Refine javadoc for Linker

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • repo-panama
    • core-libs

      For the nativeLinker, I think it may be helpful to say more about platform-specific mappings of C types, perhaps even defining a future programmatic interface. For example, the package-level docs discuss getting a MethodHandle around C's strlen using FunctionDescriptor.of(ValueLayout.JAVA_LONG, ValueLayout.ADDRESS). At a C level, strlen is defined as having a signature of "size_t strlen(const char *str)" it isn't surprising a linker would map the unsigned size_t to a Java long, but it isn't obvious either, or necessarily the only choice all all the platform a JVM would be run on (such as 32-bit).

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: