Releases: bytedeco/javacpp
Releases · bytedeco/javacpp
JavaCPP 1.5.11
November 16, 2024 version 1.5.11
- Fix
Generator
flakiness caused by calls toClass.getDeclaredMethods()
(pull #784) - Add minimal mappings for
std::chrono
from C++11 (pull #766) - Let
Parser
annotate Java constructors with@Deprecated
when appropriate (pull #757) - Add to
InfoMap.defaults
more names that are reserved in Java, but not in C++ (pull #757) - Bundle
libomp
from Visual Studio to fix presets using OpenMP on Windows (pull #755) - Fix inconsistencies when using
@Platform(inherit=..., library=...)
together (pull #747) - Let
Parser
support templates with unnamed type parameters (pull #742) - Prevent
Parser
from producing duplicate declarations for basic containers (pull #741)
JavaCPP 1.5.10
January 29, 2024 version 1.5.10
- Move native
Loader
methods toHelper
class to avoid deadlocks (issue #737) - Fix
Parser
failing to pick upInfo
for constructors with template arguments (pull #739) - Fix
MoveAdapter
andUniquePtrAdapter
causing double free on function calls (pull #738) - Fix
Parser
handling oftemplate
specialization and theirfriend
declarations (pull #733) - Improve
Parser
capabilities foroperator
and function templates (pull #732) - Fix
Parser
failing on nested initializer lists and on attributes found insideenum
declarations - Fix
Parser
for basic containers likestd::optional<std::pair<int,int> >
(issue #718) - Add support for
std::basic_string
basic container (issue bytedeco/javacpp-presets#1311) - Enhance
Parser
by adding downcast constructors for polymorphic classes (pull #700) - Let
Generator
pick up@Name
annotations onallocate()
as well (pull #700) - Fix
Parser
failing to place annotations on default constructors (pull #699) - Let
Parser
outputreset()
methods for basic containers likestd::optional
(pull #696) - Let
Parser
definefront()
andback()
for one-dimensional basic containers (pull #695) - Let
Parser
map iterators of basic containers systematically (pull #694) - Fix
Parser
for function parameters contained in template arguments (pull #693) - Fix
Parser
on function pointer declarations starting withtypedef struct
(pull bytedeco/javacpp-presets#1361)
JavaCPP 1.5.9
June 6, 2023 version 1.5.9
- Fix
Loader.extractResource()
for nested JAR files from Spring Boot (pull #685) - Have
Parser
desugar...
varargs to array[]
for return types as well (pull #682) - Fix
Parser
failing on somefriend
functions foroperator
overloading (pull #681) - Fix
Parser
incorrectly castingconst
pointers to template arguments of pointer types (pull #677) - Fix
Parser
withInfo.enumerate
failing to translateenum
values based on otherenum
values - Fix
Parser
prematurely expanding macros defined inclass
,struct
orunion
(issue #674) - Add
Info.upcast
to support class hierarchies with virtual inheritance (pull #671) - Pick up
@Adapter
,@SharedPtr
, etc annotations onallocate()
as well (pull #668) - Provide
@Virtual(subclasses=false)
to preventGenerator
from subclassing subclasses (pull #660) - Fix
Loader.getPlatform()
detection forlinux-armhf
with Temurin JDK (issue bytedeco/javacv#2001) - Fix
Parser
ignoringInfo.skip
for enumerators that do not get translated (issue bytedeco/javacpp-presets#1315) - Fix
Parser
error on C++17 style namespace declarations containing::
separators (issue #595) - Fix
Parser
observingInfo.virtualize
for non-virtual functions (pull #658) - Use regex in
Parser
to match more robustly templates and namespaces (pull #657) - Fix
Builder
default output path for class names with the same length (pull #654) - Add
Info.friendly
to haveParser
map somefriend
functions to Java methods (pull #649) - Add
Loader.loadProperties(boolean forceReload)
to reset platform properties (issue deepjavalibrary/djl#2318) - Prevent
TokenIndexer
from recursively expanding macros - Fix
Generator
passing emptyString
objects on callback for arguments using adapters - Fix
Parser
failure onenum
enumerators generated using the concat##
operator
JavaCPP 1.5.8
November 2, 2022 version 1.5.8
- Add
static long Pointer.getDirectBufferAddress(Buffer)
method for convenience (pull #629) - Fix
UniquePtrAdapter
incorrectly deallocating pointers on callbacks (issue #613) - Fix
Generator
incorrectly casting@ByVal
or@ByRef
annotatedFunctionPointer
arguments (issue bytedeco/javacpp-presets#1244) - Fix
Generator
compiler errors forFunctionPointer
with@UniquePtr
arguments (issue #613) - Fix
Generator
compiler errors on Mac for Clang without Objective-C support (pull #610) - Prevent
Parser
from outputting cast methods for base classes that areInfo.skip
(pull #607) - Ensure
Generator
andParser
process header files fromcinclude
beforeinclude
(issue #580) - Remove
sun.misc.Unsafe
config incompatible/unneeded with GraalVM Native Image 22.x (issue bytedeco/sample-projects#63) - Define default
SHARED_PTR_NAMESPACE
,UNIQUE_PTR_NAMESPACE
,OPTIONAL_NAMESPACE
tostd
on supported compilers (issue #577) - Let
Generator
treatlong
arguments and return values@ByVal
or@ByRef
with@Cast("...*")
(issue #576) - Add
BytePointer.getUnsigned()
andputUnsigned()
methods for convenience (pull #574) - Let
Parser
consideralignas
as an explicit attribute to be ignored by default (issue bytedeco/javacpp-presets#1168) - Add "org.bytedeco.javacpp.findLibraries" system property to disable search for libraries (pull #565)
- Fix
Generator
causing memory leaks forString
parameters on callback (issue bytedeco/javacpp-presets#1141) - Add
Loader.new/access/deleteGlobalRef()
methods to store JNIObject
references inPointer
(issue bytedeco/javacpp-presets#1141) - Make
Loader.findLibrary()
also search in "sun.boot.library.path" for jlink (pull #565) - Add
__int8
,__int16
,__int32
, and__int64
toInfoMap
as "basic/types" to support combinations allowed by Visual Studio - Add "org.bytedeco.javacpp.cacheLibraries" system property to disable cache for libraries (pull bytedeco/gradle-javacpp#21)
- Add public getters for the address fields of
Pointer.NativeDeallocator
(discussion bytedeco/javacpp-presets#1160) - Add support for
std::function
basic container instances with correspondingFunctionPointer
(issue bytedeco/javacpp-presets#1051) - Fix
Builder
parsing of command line options for platform properties (issue #564) - Use thread local in
Generator
to detach automatically native threads on exit for Windows as well (pull #562) - Add compiler options for C++14 and C++17 to platform properties files for Visual Studio
- Fix
Parser
incorrectly shortening type names for nested class template instances - Make
Parser
outputboolean has_value()
methods for basic containers likestd::optional
- Add
OptionalAdapter
and corresponding@Optional
annotation for containers likestd::optional
- Switch to
AttachCurrentThreadAsDaemon()
when attaching native threads on callback (pull #561) - Add to
InfoMap
default pointer and value types for integer types instd::
namespace - Fix Android platform properties for NDK r23b
JavaCPP 1.5.7
February 11, 2022 version 1.5.7
- 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)
JavaCPP 1.5.6
August 2, 2021 version 1.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)
JavaCPP 1.5.5
March 8, 2021 version 1.5.5
- Ensure
System.gc()
never gets called with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#208) - Add
Info.immutable
to disable generating setters for public data members (pull #461) - Map
String
tochar*
withCharset.forName(STRING_BYTES_CHARSET)
when that macro is defined (pull #460) - Fix
Loader.ClassProperties
not always getting overridden correctly when defined multiple times - Allow
Loader.load()
to also rename executables on extraction to output filenames specified with the#
character - Add
@AsUtf16
annotation to mapjava.lang.String
tounsigned short*
(array of UTF-16 code units) (pull #442) - Add
BasicStringAdapter
and corresponding@StdBasicString
,@StdU16String
, and@StdU32String
annotations (pull #448) - Fix
Parser
failures ontry
blocks as function body, nested class templates, and aliases to namespaces starting with::
- Prevent
Loader
from failing to find, load, or link libraries multiple times - Fix
Pointer.getPointer()
methods sometimes calling the wrong constructor (issue bytedeco/javacv#1556) - Prevent Android from trying to load
PointerBufferPoolMXBean
by using it via reflection (pull #447) - Fix Android build properties for NDK r22 and move legacy to
android-*-gcc.properties
(pull #444) - Add support for Mac on ARM processors
- Fix
Loader
not searching for libraries in more than one package - Prevent
Builder
from linking with-framework JavaVM
when a path to the JVM library is found - Replace
requires
withrequires static
in JPMS.platform
module (pull #436) - Let
Parser
outputInfo.javaText
even for template declarations with no instances - Prevent
Tokenizer
from usinglong
literals for unsigned integers of 16 bits or less - Ensure
Parser
considers>=
and<=
as single tokens to prevent failures - Make
Parser
useInfo.cppTypes
to override the type ofenum
values - Fix
Parser
not using the correctInfo.pointerTypes
forconst&
declarations - Use pthreads in
Generator
to detach automatically native threads on exit for Linux and Mac as well - Let
Loader.load()
always succeed on optional libraries only available with extensions - Fix
Builder.addProperty()
incorrectly appending values together
JavaCPP 1.5.4
September 9, 2020 version 1.5.4
- Fix
Parser
not producingPointerPointer
parameters forFunctionPointer
subclasses - Let
Builder
copy even thoseplatform.executable
files without prefix or suffix - Add missing declaration for
GetCurrentThreadId()
inGenerator
whenNO_WINDOWS_H
is defined - Process
#undef
directives to allow redefining macros withParser
(issue bytedeco/javacpp-presets#935) - Pick up in
Parser
methods specified withoverride
, in addition tovirtual
(issue #419) - Let
Parser
create a separate Java peer class whenInfo.pointerTypes
is different for types prefixed withconst
- Fix
Generator
for@Virtual
methods protected in subclasses by casting to superclass (issue #419) - Add missing values to
Info.Info(Info)
and fix incorrectInfo.skipDefaults(boolean)
(issue #420) - Add
PointerBufferPoolMXBean
to track allocations and deallocations ofPointer
(pull #413) - Change the
@Platform(executable=...
property to an array and allow bundling multiple files per class - Prevent
Builder
unnecessarily linking with-framework JavaVM
to fix GraalVM Native Image on Mac (issue #417) - Add
Pointer.getPointer()
methods as shortcuts fornew P(p).position(p.position + i)
(issue #155) - Fix
Generator
for cases when aFunctionPointer
returns anotherFunctionPointer
- Fix
Parser
failure withauto
keyword of C++11 used as placeholder type specifier or for trailing return type (issue #407) - Add
Builder.configDirectory
option to letGenerator
output files that GraalVM needs for AOT compilation (issue eclipse/deeplearning4j#7362) - Fix
Parser
error ontemplate<>
containing non-type parameters without names (issue bytedeco/javacpp-presets#889) - Bundle also the
vcruntime140_1.dll
andmsvcp140_1.dll
redist files from Visual Studio - Fix
Builder
for different "java.home" path returned by latest JDKs from Oracle (pull #400) - Refactor
Builder
a little to work around issues with Gradle - Log as warnings
SecurityException
thrown onLoader.getCacheDir()
instead of swallowing them - Fix memory leak that occurs with "org.bytedeco.javacpp.nopointergc" (issue bytedeco/javacpp-presets#878)
- Take into account
platform.library.path
when extracting executables and their libraries onLoader.load()
(issue bytedeco/javacv#1410) - Move init code for
Loader.getPlatform()
toDetector
to avoid warning messages (issue #393) - Add
HyperslabIndex
class withoffsets
,strides
,counts
, andblocks
parameters (pull #392) - Add
Index
class to allow overriding how the index is calculated inIndexer
(issue #391)
JavaCPP 1.5.3
April 14, 2020 version 1.5.3
- Deprecate but also fix
Indexer.rows()
,cols()
,width()
,height()
, andchannels()
(pull #390) - Fix
Parser
producing invalid wrappers for basic containers likestd::set<std::pair<...> >
- Add compiler options for C++98, C++03, C++14, and C++17 to platform properties files (pull #389)
- Remove default compiler options from
linux-armhf.properties
that work mostly only for Raspberry Pi - Add
Generator
support forenum
classes withboolean
values (issue #388) - Fix
Parser
outputting invalid Java code forenum
ofboolean
,byte
, andshort
types (issue #388) - Pick up in
Generator
the@Namespace
annotation from paired method too for global getters and setters (issue #387) - Add presets for
jnijavacpp
andjavacpp-platform
artifact to fix issues at load time (issue bytedeco/javacv#1305) - Prevent potential
NullPointerException
inLoader.checkVersion()
(pull #385) - Allow using
Charset
to avoidUnsupportedEncodingException
fromBytePointer
(pull #384) - Add static
Pointer.isNull(Pointer p)
helper method, for convenience - Add
MoveAdapter
and corresponding@StdMove
annotation to support objects that requirestd::move
from C++11 - Always use
File.pathSeparator
when passing multiple paths via theBUILD_PATH
environment variable - Fix
Parser
not picking upInfo
for declarations withdecltype()
specifier - Fix
Pointer
losing its owner when mistakenly ignoring deallocators forconst
values returned from adapters - Remove unnecessary declared
Exception
fromIndexer.close()
signature (pull #382) - Make sure
Parser
recognizes base classes ofstruct
aspublic
by default - Fix
Parser
error on initializer lists containing C++11 style{ ... }
for template instances - Change the default mapping of
jboolean
toBooleanPointer
instead ofBoolPointer
- Fix
Parser
error on function declarations with...
varargs as single parameter - Make
Parser
skip over&&
-qualified functions automatically since they cannot be supported - Fix
Parser
annotating pointer castoperator
methods with incorrect@Cast
(issue #379) - Allow
Parser
to inherit constructors from template classes withusing
- Make
Parser
honorInfo.skip
for anonymousstruct
orunion
as well - Optimize
Pointer.sizeof()
method of subclasses for primitive types - Let users override
Info.enumerate
on a per-enum
basis and allow attributes afterenum class
- Fix
Parser
not considering identifiers as type names when placed directly afterfriend
or intemplate<>
- Check for defined
NO_WINDOWS_H
macro inGenerator
to skip#include <windows.h>
- Provide
UIntIndexer
andULongIndexer
, treating array and buffer data as unsigned 32- or 64-bit integers, for convenience (issue #376) - Fix
Parser
not evaluatingusing namespace
with respect to the current block (issue #370) - Fix exception in
Loader
when running jlink image with JDK 13+ (pull #375) - Fix errors with
@Virtual @Name("operator ...")
inGenerator
by using Java names for C++ (issue #362) - Apply in
Parser
missingconst
to parameters of@Virtual
functions using adapters - Use in
Generator
C++11override
keyword for@Virtual
functions (pull #373) - Speed up
Loader.load()
by caching results returned fromLoader.findLibrary()
(issue #287) - Pick up
Info
correctly inParser
also for anonymous function pointers withconst
parameters - Make
Parser
applyInfo.translate
in the case of enumerators as well - Fix compiler failures in
Builder
with platform properties containing relative paths - Let
Parser
rename types usingInfo.javaNames
in addition tovalueTypes
andpointerTypes
(pull #367) - Include in the defaults of
InfoMap
mappings missing for thestd::array
andjchar
types - Fix various
Parser
failures with attributes on constructors, empty macros, enum classes, friend classes, inherited constructors, and keywords in parameter names - Add to
Parser
support for C++11 attributes found within[[
and]]
brackets - Consider
Pointer
valuesmaxBytes
ormaxPhysicalBytes
suffixed with%
as relative toRuntime.maxMemory()
(pull #365) - Prevent
Parser
from consideringconstexpr operator
declarations asconst
types - Fix on
Loader.load()
the default library name of classes without@Properties(target=..., global=...)
- Prevent
Parser
from outputtingasPointer()
cast methods with multiple inheritance (issue #360) - Add
CacheMojo
to help extract binaries and resources used by command line tools outside of the JVM - Fix Android build properties for NDK r20b (pull #357)
JavaCPP 1.5.2
November 5, 2019 version 1.5.2
- Provide
ByteIndexer
with value getters and setters for unsignedbyte
orshort
,half
,bfloat16
, andboolean
types as well - Introduce
PointerScope.extend()
to prevent deallocation on the next call toclose()
- Make
Generator
avoid ambiguous conversion errors fromUniquePtrAdapter
tostd::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 retrofitPointerScope
to use it - Fix
Parser
incorrectly inheriting default constructors multiple times withusing
- Allow in
Parser
fully qualified names asInfo.valueTypes
for enumerators as well - Perform template substitution in
Parser
also for default argument values (pull #343) - Introduce
PointerScope.forClasses
to limit thePointer
classes that can be attached to a given instance - Add support for custom
Allocator
toVectorAdapter
and customDeleter
toUniquePtrAdapter
- 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()
, andcanExecute()
whatLoader.getCacheDir()
returns - Prevent
Generator
from copying data unnecessarily when returning Java arrays from adapters (issue #317) - Fix
Parser
issues when castingconst
pointers or enumerating anonymousenum
declarations - Add
Info.objectify
to map global functions without using thestatic
modifier, similarly to Scala companion objects - Allow once more
abstract
subclasses ofFunctionPointer
(issue #318)