JavaCpp v1.5.2 Release Notes

Release Date: 2019-11-05 // 12 days ago
  • November 5, 2019 version 1.5.2

    • Provide ByteIndexer with value getters and setters for unsigned byte or short, half, bfloat16, and boolean types as well
    • Introduce PointerScope.extend() to prevent deallocation on the next call to close()
    • 👉 Make Generator avoid ambiguous conversion errors from UniquePtrAdapter to std::unique_ptr (pull #353)
    • 🛠 Fix Parser using fully qualified names for @Name annotations of nested classes (issue #352)
    • Add Parser support for macro expansion of __VA_ARGS__
    • 🛠 Fix Builder not processing all classes when given .** as input (issue bytedeco/javacv#1311)
    • Introduce reference counting in Pointer and retrofit PointerScope to use it
    • 🛠 Fix Parser incorrectly inheriting default constructors multiple times with using
    • 👍 Allow in Parser fully qualified names as Info.valueTypes for enumerators as well
    • 0️⃣ Perform template substitution in Parser also for default argument values (pull #343)
    • Introduce PointerScope.forClasses to limit the Pointer classes that can be attached to a given instance
    • ➕ Add support for custom Allocator to VectorAdapter and custom Deleter to UniquePtrAdapter
    • 👍 Enable support for OSGi bundles (pull #332)

    September 5, 2019 version 1.5.1-1

    • 👉 Use the native thread ID as name on AttachCurrentThread() (pull #339)
    • 👉 Make sure we canRead(), canWrite(), and canExecute() what Loader.getCacheDir() returns
    • Prevent Generator from copying data unnecessarily when returning Java arrays from adapters (issue #317)
    • 🛠 Fix Parser issues when casting const pointers or enumerating anonymous enum declarations
    • ➕ Add Info.objectify to map global functions without using the static modifier, similarly to Scala companion objects
    • 👍 Allow once more abstract subclasses of FunctionPointer (issue #318)

Previous changes from v1.5.1

    • Make sure Generator ignores deallocators on const values returned from adapters (issue #317)
    • Accelerate Loader.extractResource() for directories already cached, also preventing failures (issue #197)
    • Avoid Parser writing allocateArray() when single int, long, float, or double constructor already exists (issue bytedeco/javacv#1224)
    • Expose all platform properties to process executed with Builder.buildCommand via environment variables, with names uppercase and all . replaced with _
    • Let Parser add @Name or @Namespace annotations to non-translated enumerators as well
    • Make Parser pick up the names of type aliases for function pointers declared with using and prevent NullPointerException
    • Fix Parser failing on lambda expressions found inside member initialization lists of constructors
    • Add special support for constexpr variables in Parser by disabling their member setters automatically
    • Fix Parser not placing & and * at the right place inside template arguments containing function declarations
    • Support more basic containers in Parser by comparing their names in a case-insensitive manner and add annotations missing from index types
    • Fix Generator taking the @By* annotation of the paired method for the index instead of the value argument of a setter
    • Fix Parser sometimes considering global C++ identifiers starting with :: as if they were local
    • Change default value for Pointer.maxPhysicalBytes to Pointer.maxBytes + Runtime.maxMemory() (pull #310)
    • Add Loader.getVersion() and checkVersion() to get versions of Maven artifacts and check against JavaCPP (issue #194)
    • Fix compile errors caused by Generator occurring with callback functions returning a value by reference
    • Make Builder expand entries from the user class path with * as basename to all JAR files in the directory
    • Prevent Loader from creating symbolic links pointing to themselves by comparing with Path.normalize() (pull #307)
    • Fix Loader.cacheResource() with the "jrt" protocol as used by jlink (pull #305)
    • Fix compiler error with SharedPtrAdapter and UniquePtrAdapter in callback functions (pull #304)
    • Start Pointer.DeallocatorThread with setContextClassLoader(null) as required by containers (issue deeplearning4j/deeplearning4j#7737)
    • Add -print command line option to access platform properties externally, for example, inside build scripts
    • Add to InfoMap default pointer and value types for ssize_t, char16_t, char32_t, std::u16string, and std::u32string
    • Support multiple instances of FunctionPointer subclasses, up to the value in @Allocator(max=...) (issue bytedeco/javacpp-presets#683)
    • Allow suffixing library names with : to specify exact relative paths to libraries, ignoring any additional prefix or suffix
    • Prevent Loader.load() from trying to load library files that do not exist or to create symbolic links to them
    • Let Loader.load() extract libraries suffixed with ##, but still ignored for copying by Builder
    • Make sure Loader.load() also initializes classes that are passed explicitly
    • Fix Loader.createLibraryLink() incorrectly truncating library versions when there is one before and another after the suffix
    • Iterate extensions of libraries or executables on Loader.load() in reverse to be consistent with properties overriding
    • Allow prefixing library names with : to have Loader consider them as filenames with prefix and suffix already included
    • Add Loader.loadGlobal() to load symbols globally as often required by Python libraries (issue ContinuumIO/anaconda-issues#6401)