Here are the main changes in this release :

  • Fixed recent regression in which wrong Pointer class was used instead of com.sun.jna.Pointer
  • Using Pointer instead of ByteByReference for char* arguments and struct fields
  • Optional Scala output with implicit functions to create Callback subclasses out of functions with a compatible signature (-scalaOut switch)
  • Updated to JNA 3.2.2
  • Now accepting files directly specified in command line regardless of their extension. When recursing on directories, switch -allowedFileExts controls the extensions of files to be parsed
  • New function alternatives logic : for each function, JNAerator tries 3

    conversion strategies. If all or some of the strategies lead to the same

    signature, there will be less than 3 methods in the output, as previously (so

    far, no change).

    The three strategies are as follows :</p>

    1. “native parameters” : will convert anything ** to Pointer or some PointerType,
    struct\* to their corresponding Java types, primitive\* to PrimitiveByReference   2. &#8220;native params with struct ptr ptrs&#8221; : will convert struct** to
      
    Struct.ByReference[] (same for unions), all the rest being as the &#8220;native
      
    parameters&#8221; strategy   3. &#8220;primitive or buffer parameters&#8221; : will convert &#8220;const primitive*&#8221; to
      
    primitive[], &#8220;primitive*&#8221; to PrimitiveBuffer, and all the rest being as the
      
    &#8220;native params with struct ptr ptrs&#8221; strategy. If the new -noPrimitiveArrays
      
    switch is specified, even &#8220;const primitive*&#8221; will be converted as
      
    PrimitiveBuffers (this is then not much of as loss, as any prim array can be
      
    wrapped in an NIO buffer). 
    
  • added -noMangling and -noComment switches (with a new checkbox in the studio

    to enable both of them). The studio checkboxes are now saved and restored

    between launches.

  • added “S Structure.use(Pointer p)” to get an equivalent of the pointer

    assignment constructor : MyStruct s = new MyStruct().use(ptr); (btw, there is no

    such constructor not to confuse the users with the fields constructors)

  • fixed global generation of extern struct S { int b; } a;
  • And last but not least, JNAerator is now built with Maven from the bottom up and its Maven repository and “maven site” are stored on Sourceforge, which actually required quite a bit more work than I expected.

    This won’t change the life of non-Maven users, but there has still some implications :</p>

    • The JNAeratorStudio’s JNLP file moved to a new URL : you might need to uninstall the older one first (go to Java Preferences, “see cache” and delete JNAeratorStudio)
    • JNAerator now has two JAR releases : the tool “jnaerator-X.Y.Z.jar”, and the runtime (included in the tool) “jnaerator-runtime.X.Y.Z.jar”
    • No more build numbers… You can now expect X.Y.Z for releases, and X.Y.Z-SNAPSHOT for latest development versions
    • In a near future, a JNAeration Maven plugin should let Maven-addicts use JNAerator from their favourite build tool

webstart