Release 3.0.3
Features
- Enable build/run using IBM's J9 VM (leonardo).
- Make StdCallFunctionMapper attempt a leading underscore if the simpler mapping doesn't work.
- Allow Structure.read to overwrite final fields (may not work on some 1.4 VMs).
Bug Fixes
- Fix NPE when passing an array of Structure.ByReference.
- Compare entire linux library version when finding a match.
- Don't pass struct by value unless the method signature declares it.
- Restrict custom first element structure alignment to OSX/ppc.
- Improve performance and reduce memory footprint for window masks.
Optimize polygon-based masks on w32. Use XFillRectangles on X11.
- Fix linkage settings on sunos-amd64 to avoid relocation errors.
- Fix callback allocation code on w32, solaris, freebsd, darwin (libffi was misconfigured).
- Fix bug when NativeMapped fields are used in a Structure.ByValue instance.
- Fix NPE calling Structure.read() before memory is initialized.
- Fix NPE calling Structure.read/write with uninitialized NativeMapped fields.
Release 3.0.2
Features
- Attempt to force unload of jnidispatch library prior to deleting it (w32).
- Added amd64 targets for OSX, FreeBSD, and Solaris.
Bug Fixes
- Reduce space allocated for invocation arguments.
- Fix NPE when NativeMapped type is used in a Structure.
- Fix some X11 type mappings for 64-bit.
- Fix OSX Leopard/JRE1.5+ window transparency.
- Fix window alpha compositing on X11.
- Fix loading of libraries with unicode names on OSX.
Release 3.0.1
Features
- Improve transparent window drawing performance on w32
- Use closure allocation from libffi
Bug Fixes
- Ensure nested structure arrays initialized with Structure.toArray use the
appropriate native memory.
- Ensure structure size is calculated prior to converting to array
- Avoid creating new windows when setting a window mask
- Fix bug in Pointer.setChar.
Release 3.0
Features
- More supported platforms, via GCC's libffi (wmeissner)
- Support struct by value as parameter and return value (duncan)
- Support struct by reference within structures
- Provide access to native peer for java.awt.Component
- Provide access to native peer on OS X.
- Support MINGW32 builds (fullung)
- Allow per-field Structure read/write by field name
- Avoid writing Structure fields marked 'volatile'
- Read and wrap function pointers in Structure fields when read with a Java
proxy to allow easy Java-side invocation (Ken Larson)
- Support array-backed Buffers as arguments (wmeissner)
- Auto-conversion of custom types (wmeissner)
- Allow pointer type-safety
- Optional VM crash protection, via Native.setProtected(boolean)
- Auto-convert WString[]
- Provide library synchronization wrapper similar to Collections.synchronizedX
- Support lookup of OSX framework libraries by name
- Explicit access to shared library global data
- Invocation interception to facilitate translation of C preprocessor macros
and inline functions
- Provide utility to determine Web Start native library cache location;
auto-include this path if jnidispatch is included as a
(robertengels)
- Provide access to aligned memory
- Versioning information embedded in jna.jar and native library
Bug Fixes
Avoid attempts to free native library if it failed to load (wmeissner)
Explicitly check method signatures for varargs instead of heuristically
guessing (wmeissner)
Disallow declaring Pointer-derived fields in Structures (Function, Memory)
Ensure Object.toString/hashCode/equals methods are intercepted on proxyied
interfaces
Update X11 library for 64-bit use (wmeissner)
Properly map arrays of char*/wchar_t* under w32
Allow Pointer[] as a Structure field and Function argument
Fix some misleading Structure error messages
Properly preserve/return GetLastError/errno after native calls
Allocate executable memory on w32 to avoid errors with hardware-enforced
data execution protection (DEP)
Fix VM crash on w32 stdcall callbacks
Use long offsets and sizes rather than ints (64-bit safe)
Properly clean up references and release closure memory on JNI_Unload
Use simpler AWT/JAWT library loading workaround
Avoid changing array references within a Structure on read
Release 2.5
Features
- Unions
- Optimized shaped windows (chris deckers & olivier chafik); instantiation time
improved by about 2-3 orders of magnitude for large, mostly contiguous shapes
- Provide type mapping in callback arguments/results
- Provide access to ByteBuffer direct address as a Pointer
- Provide customization of native string encoding with jna.encoding system property
Bug Fixes
- Properly handle VMs with reversed Structure member storage
- Avoid making window undecorated when clearing window mask on X11
- Fix structure alignment bug on OSX/PPC when first element is > 4 bytes in size
- Clearing OSX window mask by setting to MASK_NONE now works properly
- Avoid index exceptions if native buffers are not NUL-terminated on string conversions
- Write initialized Structure[] argument memory prior to function calls
- Fix IllegalArgumentException reading WString into a Structure
- Clear memory when allocating a structure block (fixes VM crash)
- Remove versioned JAWT dependency on OSX, allowing use on 10.3/JRE1.4.
Release 2.4
Features
- Explicitly support unaligned structures
- Auto-reallocate structure arrays
- Automatic handling of w32 UNICODE/ASCII variants
- Automatic mapping of decorated w32 stdcall function names
- Customizable, automatic type conversion of arguments and results (wmeissner)
- Support char*[] arguments as Java String[]
- Structure supports Callback members (wmeissner)
- getByteBuffer from Pointer/Memory (wmeissner)
- Allow GC of native libraries
- Facilitate use from non-Java contexts (JRuby et al.) (wmeissner)
- Improve library path searching (wmeissner)
- Handle Structure[] arguments
- Handle native long arguments and return values
- Handle direct and array-based ByteBuffer arguments (wmeissner)
- Change default w32 build to use GCC (it's free, yo)
Bug Fixes
- Structure.toArray failed to initialize members
- Disallow explicit free of Structure/Memory
- Ensure native libraries are only loaded once until released
- Properly handle NULL when the return value is a Structure
- Proper conversion to wchar_t on linux
- Copy full length of Java strings to C strings instead of stopping when a NUL
character is encountered