typedef can interfere with primitive classes

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: repo-panama
    • Component/s: tools

      jextract can fail if a C header file have a typedef that collides with the java.lang classes on a primitive type.

      For example, with following C header,

      typedef char Byte;
      void func(Byte byte, Byte* out);

      jextract would spit out a function like following,

      public void func(byte byte$, Pointer<Byte> out);

      and an annotation class for typedef,

      public static @interface Byte {}

      This will cause compilation errors on the static-forwarder or user code.

      The immediate thought would be trying to use --exclude-symbol to filter out Byte, but that doesn't work because symbol filter doesn't apply to typedef.

            Assignee:
            Henry Jen
            Reporter:
            Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: