Refine javadoc for Linker

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P2
    • None
    • Affects Version/s: repo-panama
    • Component/s: 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).

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

              Created:
              Updated:
              Resolved: