JavaCPP v1.5.7 Release Notes
Release Date: 2022-02-11 // over 2 years ago-
- Add
Loader.clearCacheDir()
along with newClearMojo
and-clear
command line option - Speed up
Loader
on Windows when there are no symbolic links or library versions (pull #512) - Enhance
Pointer.physicalBytes()
by excluding shared pages from memory-mapped files, etc (issue #468) - Fix
Parser
not correctly encoding files of top-level classes produced with@Properties(target=..., global=...)
- Add
Pointer.interruptDeallocatorThread()
method to make JavaCPP classes eligible for GC (discussion bytedeco/javacpp-presets#1115) - Let
Parser
output the content ofInfo.javaText
in the case ofFunctionPointer
as well - Fix
TokenIndexer
failure on macros using the concat##
operator with empty arguments (issue #525) - Let
Parser
support arrays of anonymousstruct
orunion
containing another one (discussion #528) - Prevent
Parser
from outputting duplicatePointer
constructors for basic containers - Fix
Generator
compiler errors on callback functions returning objects without default constructors - Ensure
Builder
copies resources only from the first directories found in the paths - Add
Loader.getCanonicalPath()
to work around bugs inFile.getCanonicalPath()
on Windows (pull #519) - Add
FunctionPointer
and@Virtual
methods missing from config files required by GraalVM Native Image - Let
Tokenizer
convert characters using ASCII escape sequences'\x...'
to normal hexadecimal values0x...
- Fix
Parser
incorrectly mapping default function arguments containing multiple template arguments - Fix
Parser
failures on variadic templates callingsizeof...()
and on variables initialized from template values - Prevent
Parser
from failing on nonexistent header files contained in@Platform(exclude=...)
- Add
classOrPackageNames
parameter toCacheMojo
(pull #510)
- Add
Previous changes from v1.5.6
-
- Add missing export to
module-info.java
file for presets package (pull #508) - Add
@NoException(true)
value to support overridingvirtual noexcept
functions - Bundle more DLLs from UCRT to fix the systems presets on Windows
- Fix
Pointer.sizeof()
method for subclasses of subclasses for primitive types (issue bytedeco/javacpp-presets#1064) - Throw more accurate
UnsatisfiedLinkError
whenLoader.load()
fails to find JNI libraries - Let
Parser
checkInfo.skipDefaults
also for types to ignore default constructors (issue #493) - Fix
Parser
failure onenum
declarations without enumerators - Let
Generator
use the third element of@Cast(value)
on return values passed to adapters (issue tensorflow/java#345) - Prevent
Generator
from swallowing exceptions caught onBuffer.array()
(pull #504) - Add
enum
classes as well as resources missing from config files required by GraalVM Native Image - Let
Parser
annotate&&
parameters with new@ByRef(true)
value used byGenerator
to callstd::move()
- Fix
Parser
overlooking anonymousclass
,struct
orunion
with comments after}
(issue #501) - Add
Info.beanify
to haveParser
generate JavaBeans-style getters and setters (pull #495) - Allow
Parser
to useInfo.javaNames
for function names containing parameters as well (issue #492) - Fix
Parser
producing incorrect calls to function templates with non-type parameters (issue #491) - Add missing
presets/package-info.java
required for OSGi and add profile for M2Eclipse (pull #490) - Remove unnecessary mutex lock for pthreads on callbacks in
Generator
(pull #489) - Fix
@AsUtf16
handling for setter methods paired with getters inGenerator
(pull #488) - Allow defining
NO_JNI_DETACH_THREAD
to avoid overhead from pthreads on callbacks (issue #486) - Pick up
@Allocator
,@CriticalRegion
,@NoException
inGenerator
from@Properties(inherit=classes)
as well (issue #484) - Add support for
Deleter
of pointer types toUniquePtrAdapter
- Add
@Platform(pattern=...)
annotation value to allow matching with regular expressions as well - Allow
Parser
to consider function pointers declared withusing
but without indirections - Let
Parser
map to annotations whole expressions starting with the__attribute__
keyword - Fix
Parser
sometimes failing to create template instances with default arguments (issue #478) - Enhance
Parser
to handletypedef
correctly in the case ofenum
as well (issue #477) - Upon
Pointer.getPointer(Class<P>)
scaleposition
,limit
, andcapacity
withsizeof()
(pull #476) - Fix
Parser
incorrectly translating non-documentation comments as part of documentation comments (issue #475) - Set
Pointer.maxPhysicalBytes
to4 * Runtime.maxMemory()
by default as workaround for Android, memory-mapped files, ZGC, etc (issue #468) - Ensure
synchronized
code inPointer
gets skipped with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#313) - Add
protected Pointer.offsetAddress()
and use it forgetPointer()
instead ofposition()
- Fix potential infinite loop in
Parser
when processingclass
,struct
, orunion
declarations - Have
Parser
wrap theerase()
methods of basic containers with iterators to allow removing from maps - Let
Parser
output the content ofInfo.javaText
in the case of basic containers as well - Fix
Parser
failure on arguments containing multiple array accesses ending with]]
- Fix
Parser
incorrectly considering some array definitions with expressions as multidimensional - Log loading errors of optional
jnijavacpp
as debug messages instead of warnings (issue tensorflow/java#189) - Fix memory leak in
Pointer.releaseReference()
with "org.bytedeco.javacpp.nopointergc" (issue awslabs/djl#690) - Fix
Parser
not stripping annotations fromInfo.pointerTypes
when creating Java peer classes - Fix
Parser
not inheriting constructors with existingInfo
or with nested templates - Add support for
std::tuple
,std::optional
, andstd::variant
basic containers and fix variousParser
failures - Add parameter for
Loader.load()
to return path of a specific executable (pull #466) - Use
std::uninitialized_copy
inVectorAdapter
to make sure copy constructors get called (pull #465)
- Add missing export to