Since my last post, I did the following changes to JNAerator :

  • Added support for global variables : lazy binding, full typing, natural syntax

    For instance, “int errno;” in library “c” will be fetched as an IntByReference with : CLibrary.errno.get().

  • JNAeratorStudio compiles the generated code on the fly with the Java Compiler API (hence now requires Java 6 to run)
  • JNAeratorStudio’s input text area now supports undo/redo
  • Added Buffer alternative to function signatures : now has at most three alternatives (pointers, buffers or primitive arrays)
  • Support for some simple VC++ annotations (__ptr64, etc…) to enhance parsing of WinNT.h a bit
  • Fixed some null pointer errors (changeValue(…, list,…) now only keeps non-null

    children)

  • Fixed comment import for structures
  • Fixed very large numeric constants (unsigned long long that are bigger than Long.MAX_VALUE)
  • Fixed ref to anonymous callbacks in structs
  • Now generates properly : struct X { int i; long l; } (\*var[5])(X\*, enum { A, B} (*e)());
  • Fixed retrieval of single-line comments before elements (wrongly allowed extra

    line break)

  • Fixed resolution of pointers to typedefs :

    typedef int16_t cl_short   __attribute__((aligned(2)));
    cl_short s;
    
  • Fixed parenthesis of converted expressions :

    const int i = (1 + 2) * 3;

  • Fixed the JNLP file : shortcut is now “online”
  • Updated the wiki To test these fixes and new features, launch JNAeratorStudio via Java Web Start