- Use
-mno-outline-atomicsinlinux-arm64.propertiesto work around linker bug (issue bytedeco/javacpp-presets#1671) - Add
NativeAllocationTracerto track allocations and deallocations ofPointer(pull #816) - Fix Android platform properties for NDK r28 (pull #812)
- Add support for
windows-arm64withwindows-arm64.properties(pull #813) - Make
Pointer.trimMemory()public to reclaim manually system memory on Linux (issue bytedeco/javacv#2334)
- Fix
Tokenizernot skipping over BOM characters at beginning of files - Replace
unsigned shortwithchar16_twhen mappingjchar(pull #800) - Add support for
linux-riscv64withlinux-riscv64.properties(pull #781)
- Fix
Generatorflakiness caused by calls toClass.getDeclaredMethods()(pull #784) - Add minimal mappings for
std::chronofrom C++11 (pull #766) - Let
Parserannotate Java constructors with@Deprecatedwhen appropriate (pull #757) - Add to
InfoMap.defaultsmore names that are reserved in Java, but not in C++ (pull #757) - Bundle
libompfrom Visual Studio to fix presets using OpenMP on Windows (pull #755) - Fix inconsistencies when using
@Platform(inherit=..., library=...)together (issue #747) - Let
Parsersupport templates with unnamed type parameters (pull #742) - Prevent
Parserfrom producing duplicate declarations for basic containers (pull #741)
- Move native
Loadermethods toHelperclass to avoid deadlocks (issue #737) - Fix
Parserfailing to pick upInfofor constructors with template arguments (pull #739) - Fix
MoveAdapterandUniquePtrAdaptercausing double free on function calls (pull #738) - Fix
Parserhandling oftemplatespecialization and theirfrienddeclarations (pull #733) - Improve
Parsercapabilities foroperatorand function templates (pull #732) - Fix
Parserfailing on nested initializer lists and on attributes found insideenumdeclarations - Fix
Parserfor basic containers likestd::optional<std::pair<int,int> >(issue #718) - Add support for
std::basic_stringbasic container (issue bytedeco/javacpp-presets#1311) - Enhance
Parserby adding downcast constructors for polymorphic classes (pull #700) - Let
Generatorpick up@Nameannotations onallocate()as well (pull #700) - Fix
Parserfailing to place annotations on default constructors (pull #699) - Let
Parseroutputreset()methods for basic containers likestd::optional(pull #696) - Let
Parserdefinefront()andback()for one-dimensional basic containers (pull #695) - Let
Parsermap iterators of basic containers systematically (pull #694) - Fix
Parserfor function parameters contained in template arguments (pull #693) - Fix
Parseron function pointer declarations starting withtypedef struct(pull bytedeco/javacpp-presets#1361)
- Fix
Loader.extractResource()for nested JAR files from Spring Boot (pull #685) - Have
Parserdesugar...varargs to array[]for return types as well (pull #682) - Fix
Parserfailing on somefriendfunctions foroperatoroverloading (pull #681) - Fix
Parserincorrectly castingconstpointers to template arguments of pointer types (pull #677) - Fix
ParserwithInfo.enumeratefailing to translateenumvalues based on otherenumvalues - Fix
Parserprematurely expanding macros defined inclass,structorunion(issue #674) - Add
Info.upcastto support class hierarchies with virtual inheritance (pull #671) - Pick up
@Adapter,@SharedPtr, etc annotations onallocate()as well (pull #668) - Provide
@Virtual(subclasses=false)to preventGeneratorfrom subclassing subclasses (pull #660) - Fix
Loader.getPlatform()detection forlinux-armhfwith Temurin JDK (issue bytedeco/javacv#2001) - Fix
ParserignoringInfo.skipfor enumerators that do not get translated (issue bytedeco/javacpp-presets#1315) - Fix
Parsererror on C++17 style namespace declarations containing::separators (issue #595) - Fix
ParserobservingInfo.virtualizefor non-virtual functions (pull #658) - Use regex in
Parserto match more robustly templates and namespaces (pull #657) - Fix
Builderdefault output path for class names with the same length (pull #654) - Add
Info.friendlyto haveParsermap somefriendfunctions to Java methods (pull #649) - Add
Loader.loadProperties(boolean forceReload)to reset platform properties (issue deepjavalibrary/djl#2318) - Prevent
TokenIndexerfrom recursively expanding macros - Fix
Generatorpassing emptyStringobjects on callback for arguments using adapters - Fix
Parserfailure onenumenumerators generated using the concat##operator
- Add
static long Pointer.getDirectBufferAddress(Buffer)method for convenience (pull #629) - Fix
UniquePtrAdapterincorrectly deallocating pointers on callbacks (issue #613) - Fix
Generatorincorrectly casting@ByValor@ByRefannotatedFunctionPointerarguments (issue bytedeco/javacpp-presets#1244) - Fix
Generatorcompiler errors forFunctionPointerwith@UniquePtrarguments (issue #613) - Fix
Generatorcompiler errors on Mac for Clang without Objective-C support (pull #610) - Prevent
Parserfrom outputting cast methods for base classes that areInfo.skip(pull #607) - Ensure
GeneratorandParserprocess header files fromcincludebeforeinclude(issue #580) - Remove
sun.misc.Unsafeconfig incompatible/unneeded with GraalVM Native Image 22.x (issue bytedeco/sample-projects#63) - Define default
SHARED_PTR_NAMESPACE,UNIQUE_PTR_NAMESPACE,OPTIONAL_NAMESPACEtostdon supported compilers (issue #577) - Let
Generatortreatlongarguments and return values@ByValor@ByRefwith@Cast("...*")(issue #576) - Add
BytePointer.getUnsigned()andputUnsigned()methods for convenience (pull #574) - Let
Parserconsideralignasas 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
Generatorcausing memory leaks forStringparameters on callback (issue bytedeco/javacpp-presets#1141) - Add
Loader.new/access/deleteGlobalRef()methods to store JNIObjectreferences 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__int64toInfoMapas "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::functionbasic container instances with correspondingFunctionPointer(issue bytedeco/javacpp-presets#1051) - Fix
Builderparsing of command line options for platform properties (issue #564) - Use thread local in
Generatorto 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
Parserincorrectly shortening type names for nested class template instances - Make
Parseroutputboolean has_value()methods for basic containers likestd::optional - Add
OptionalAdapterand corresponding@Optionalannotation for containers likestd::optional - Switch to
AttachCurrentThreadAsDaemon()when attaching native threads on callback (pull #561) - Add to
InfoMapdefault pointer and value types for integer types instd::namespace - Fix Android platform properties for NDK r23b
- Add
Loader.clearCacheDir()along with newClearMojoand-clearcommand line option - Speed up
Loaderon 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
Parsernot 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
Parseroutput the content ofInfo.javaTextin the case ofFunctionPointeras well - Fix
TokenIndexerfailure on macros using the concat##operator with empty arguments (issue #525) - Let
Parsersupport arrays of anonymousstructorunioncontaining another one (discussion #528) - Prevent
Parserfrom outputting duplicatePointerconstructors for basic containers - Fix
Generatorcompiler errors on callback functions returning objects without default constructors - Ensure
Buildercopies resources only from the first directories found in the paths - Add
Loader.getCanonicalPath()to work around bugs inFile.getCanonicalPath()on Windows (pull #519) - Add
FunctionPointerand@Virtualmethods missing from config files required by GraalVM Native Image - Let
Tokenizerconvert characters using ASCII escape sequences'\x...'to normal hexadecimal values0x... - Fix
Parserincorrectly mapping default function arguments containing multiple template arguments - Fix
Parserfailures on variadic templates callingsizeof...()and on variables initialized from template values - Prevent
Parserfrom failing on nonexistent header files contained in@Platform(exclude=...) - Add
classOrPackageNamesparameter toCacheMojo(pull #510)
- Add missing export to
module-info.javafile for presets package (pull #508) - Add
@NoException(true)value to support overridingvirtual noexceptfunctions - 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
UnsatisfiedLinkErrorwhenLoader.load()fails to find JNI libraries - Let
ParsercheckInfo.skipDefaultsalso for types to ignore default constructors (issue #493) - Fix
Parserfailure onenumdeclarations without enumerators - Let
Generatoruse the third element of@Cast(value)on return values passed to adapters (issue tensorflow/java#345) - Prevent
Generatorfrom swallowing exceptions caught onBuffer.array()(pull #504) - Add
enumclasses as well as resources missing from config files required by GraalVM Native Image - Let
Parserannotate&¶meters with new@ByRef(true)value used byGeneratorto callstd::move() - Fix
Parseroverlooking anonymousclass,structorunionwith comments after}(issue #501) - Add
Info.beanifyto haveParsergenerate JavaBeans-style getters and setters (pull #495) - Allow
Parserto useInfo.javaNamesfor function names containing parameters as well (issue #492) - Fix
Parserproducing incorrect calls to function templates with non-type parameters (issue #491) - Add missing
presets/package-info.javarequired for OSGi and add profile for M2Eclipse (pull #490) - Remove unnecessary mutex lock for pthreads on callbacks in
Generator(pull #489) - Fix
@AsUtf16handling for setter methods paired with getters inGenerator(pull #488) - Allow defining
NO_JNI_DETACH_THREADto avoid overhead from pthreads on callbacks (issue #486) - Pick up
@Allocator,@CriticalRegion,@NoExceptioninGeneratorfrom@Properties(inherit=classes)as well (issue #484) - Add support for
Deleterof pointer types toUniquePtrAdapter - Add
@Platform(pattern=...)annotation value to allow matching with regular expressions as well - Allow
Parserto consider function pointers declared withusingbut without indirections - Let
Parsermap to annotations whole expressions starting with the__attribute__keyword - Fix
Parsersometimes failing to create template instances with default arguments (issue #478) - Enhance
Parserto handletypedefcorrectly in the case ofenumas well (issue #477) - Upon
Pointer.getPointer(Class<P>)scaleposition,limit, andcapacitywithsizeof()(pull #476) - Fix
Parserincorrectly translating non-documentation comments as part of documentation comments (issue #475) - Set
Pointer.maxPhysicalBytesto4 * Runtime.maxMemory()by default as workaround for Android, memory-mapped files, ZGC, etc (issue #468) - Ensure
synchronizedcode inPointergets 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
Parserwhen processingclass,struct, oruniondeclarations - Have
Parserwrap theerase()methods of basic containers with iterators to allow removing from maps - Let
Parseroutput the content ofInfo.javaTextin the case of basic containers as well - Fix
Parserfailure on arguments containing multiple array accesses ending with]] - Fix
Parserincorrectly considering some array definitions with expressions as multidimensional - Log loading errors of optional
jnijavacppas 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
Parsernot stripping annotations fromInfo.pointerTypeswhen creating Java peer classes - Fix
Parsernot inheriting constructors with existingInfoor with nested templates - Add support for
std::tuple,std::optional, andstd::variantbasic containers and fix variousParserfailures - Add parameter for
Loader.load()to return path of a specific executable (pull #466) - Use
std::uninitialized_copyinVectorAdapterto make sure copy constructors get called (pull #465)
- Ensure
System.gc()never gets called with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#208) - Add
Info.immutableto disable generating setters for public data members (pull #461) - Map
Stringtochar*withCharset.forName(STRING_BYTES_CHARSET)when that macro is defined (pull #460) - Fix
Loader.ClassPropertiesnot 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
@AsUtf16annotation to mapjava.lang.Stringtounsigned short*(array of UTF-16 code units) (pull #442) - Add
BasicStringAdapterand corresponding@StdBasicString,@StdU16String, and@StdU32Stringannotations (pull #448) - Fix
Parserfailures ontryblocks as function body, nested class templates, and aliases to namespaces starting with:: - Prevent
Loaderfrom 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
PointerBufferPoolMXBeanby 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
Loadernot searching for libraries in more than one package - Prevent
Builderfrom linking with-framework JavaVMwhen a path to the JVM library is found - Replace
requireswithrequires staticin JPMS.platformmodule (pull #436) - Let
ParseroutputInfo.javaTexteven for template declarations with no instances - Prevent
Tokenizerfrom usinglongliterals for unsigned integers of 16 bits or less - Ensure
Parserconsiders>=and<=as single tokens to prevent failures - Make
ParseruseInfo.cppTypesto override the type ofenumvalues - Fix
Parsernot using the correctInfo.pointerTypesforconst&declarations - Use pthreads in
Generatorto 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
- Fix
Parsernot producingPointerPointerparameters forFunctionPointersubclasses - Let
Buildercopy even thoseplatform.executablefiles without prefix or suffix - Add missing declaration for
GetCurrentThreadId()inGeneratorwhenNO_WINDOWS_His defined - Process
#undefdirectives to allow redefining macros withParser(issue bytedeco/javacpp-presets#935) - Pick up in
Parsermethods specified withoverride, in addition tovirtual(issue #419) - Let
Parsercreate a separate Java peer class whenInfo.pointerTypesis different for types prefixed withconst - Fix
Generatorfor@Virtualmethods protected in subclasses by casting to superclass (issue #419) - Add missing values to
Info.Info(Info)and fix incorrectInfo.skipDefaults(boolean)(issue #420) - Add
PointerBufferPoolMXBeanto track allocations and deallocations ofPointer(pull #413) - Change the
@Platform(executable=...property to an array and allow bundling multiple files per class - Prevent
Builderunnecessarily linking with-framework JavaVMto fix GraalVM Native Image on Mac (issue #417) - Add
Pointer.getPointer()methods as shortcuts fornew P(p).position(p.position + i)(issue #155) - Fix
Generatorfor cases when aFunctionPointerreturns anotherFunctionPointer - Fix
Parserfailure withautokeyword of C++11 used as placeholder type specifier or for trailing return type (issue #407) - Add
Builder.configDirectoryoption to letGeneratoroutput files that GraalVM needs for AOT compilation (issue eclipse/deeplearning4j#7362) - Fix
Parsererror ontemplate<>containing non-type parameters without names (issue bytedeco/javacpp-presets#889) - Bundle also the
vcruntime140_1.dllandmsvcp140_1.dllredist files from Visual Studio - Fix
Builderfor different "java.home" path returned by latest JDKs from Oracle (pull #400) - Refactor
Buildera little to work around issues with Gradle - Log as warnings
SecurityExceptionthrown 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.pathwhen extracting executables and their libraries onLoader.load()(issue bytedeco/javacv#1410) - Move init code for
Loader.getPlatform()toDetectorto avoid warning messages (issue #393) - Add
HyperslabIndexclass withoffsets,strides,counts, andblocksparameters (pull #392) - Add
Indexclass to allow overriding how the index is calculated inIndexer(issue #391)
- Deprecate but also fix
Indexer.rows(),cols(),width(),height(), andchannels()(pull #390) - Fix
Parserproducing 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.propertiesthat work mostly only for Raspberry Pi - Add
Generatorsupport forenumclasses withbooleanvalues (issue #388) - Fix
Parseroutputting invalid Java code forenumofboolean,byte, andshorttypes (issue #388) - Pick up in
Generatorthe@Namespaceannotation from paired method too for global getters and setters (issue #387) - Add presets for
jnijavacppandjavacpp-platformartifact to fix issues at load time (issue bytedeco/javacv#1305) - Prevent potential
NullPointerExceptioninLoader.checkVersion()(pull #385) - Allow using
Charsetto avoidUnsupportedEncodingExceptionfromBytePointer(pull #384) - Add static
Pointer.isNull(Pointer p)helper method, for convenience - Add
MoveAdapterand corresponding@StdMoveannotation to support objects that requirestd::movefrom C++11 - Always use
File.pathSeparatorwhen passing multiple paths via theBUILD_PATHenvironment variable - Fix
Parsernot picking upInfofor declarations withdecltype()specifier - Fix
Pointerlosing its owner when mistakenly ignoring deallocators forconstvalues returned from adapters - Remove unnecessary declared
ExceptionfromIndexer.close()signature (pull #382) - Make sure
Parserrecognizes base classes ofstructaspublicby default - Fix
Parsererror on initializer lists containing C++11 style{ ... }for template instances - Change the default mapping of
jbooleantoBooleanPointerinstead ofBoolPointer - Fix
Parsererror on function declarations with...varargs as single parameter - Make
Parserskip over&&-qualified functions automatically since they cannot be supported - Fix
Parserannotating pointer castoperatormethods with incorrect@Cast(issue #379) - Allow
Parserto inherit constructors from template classes withusing - Make
ParserhonorInfo.skipfor anonymousstructorunionas well - Optimize
Pointer.sizeof()method of subclasses for primitive types - Let users override
Info.enumerateon a per-enumbasis and allow attributes afterenum class - Fix
Parsernot considering identifiers as type names when placed directly afterfriendor intemplate<> - Check for defined
NO_WINDOWS_Hmacro inGeneratorto skip#include <windows.h> - Provide
UIntIndexerandULongIndexer, treating array and buffer data as unsigned 32- or 64-bit integers, for convenience (issue #376) - Fix
Parsernot evaluatingusing namespacewith respect to the current block (issue #370) - Fix exception in
Loaderwhen running jlink image with JDK 13+ (pull #375) - Fix errors with
@Virtual @Name("operator ...")inGeneratorby using Java names for C++ (issue #362) - Apply in
Parsermissingconstto parameters of@Virtualfunctions using adapters - Use in
GeneratorC++11overridekeyword for@Virtualfunctions (pull #373) - Speed up
Loader.load()by caching results returned fromLoader.findLibrary()(issue #287) - Pick up
Infocorrectly inParseralso for anonymous function pointers withconstparameters - Make
ParserapplyInfo.translatein the case of enumerators as well - Fix compiler failures in
Builderwith platform properties containing relative paths - Let
Parserrename types usingInfo.javaNamesin addition tovalueTypesandpointerTypes(pull #367) - Include in the defaults of
InfoMapmappings missing for thestd::arrayandjchartypes - Fix various
Parserfailures with attributes on constructors, empty macros, enum classes, friend classes, inherited constructors, and keywords in parameter names - Add to
Parsersupport for C++11 attributes found within[[and]]brackets - Consider
PointervaluesmaxBytesormaxPhysicalBytessuffixed with%as relative toRuntime.maxMemory()(pull #365) - Prevent
Parserfrom consideringconstexpr operatordeclarations asconsttypes - Fix on
Loader.load()the default library name of classes without@Properties(target=..., global=...) - Prevent
Parserfrom outputtingasPointer()cast methods with multiple inheritance (issue #360) - Add
CacheMojoto help extract binaries and resources used by command line tools outside of the JVM - Fix Android build properties for NDK r20b (pull #357)
- Provide
ByteIndexerwith value getters and setters for unsignedbyteorshort,half,bfloat16, andbooleantypes as well - Introduce
PointerScope.extend()to prevent deallocation on the next call toclose() - Make
Generatoravoid ambiguous conversion errors fromUniquePtrAdaptertostd::unique_ptr(pull #353) - Fix
Parserusing fully qualified names for@Nameannotations of nested classes (issue #352) - Add
Parsersupport for macro expansion of__VA_ARGS__ - Fix
Buildernot processing all classes when given.**as input (issue bytedeco/javacv#1311) - Introduce reference counting in
Pointerand retrofitPointerScopeto use it - Fix
Parserincorrectly inheriting default constructors multiple times withusing - Allow in
Parserfully qualified names asInfo.valueTypesfor enumerators as well - Perform template substitution in
Parseralso for default argument values (pull #343) - Introduce
PointerScope.forClassesto limit thePointerclasses that can be attached to a given instance - Add support for custom
AllocatortoVectorAdapterand customDeletertoUniquePtrAdapter - Enable support for OSGi bundles (pull #332)
- Use the native thread ID as name on
AttachCurrentThread()(pull #339) - Make sure we
canRead(),canWrite(), andcanExecute()whatLoader.getCacheDir()returns - Prevent
Generatorfrom copying data unnecessarily when returning Java arrays from adapters (issue #317) - Fix
Parserissues when castingconstpointers or enumerating anonymousenumdeclarations - Add
Info.objectifyto map global functions without using thestaticmodifier, similarly to Scala companion objects - Allow once more
abstractsubclasses ofFunctionPointer(issue #318)
- Make sure
Generatorignores deallocators onconstvalues returned from adapters (issue #317) - Accelerate
Loader.extractResource()for directories already cached, also preventing failures (issue #197) - Avoid
ParserwritingallocateArray()when singleint,long,float, ordoubleconstructor already exists (issue bytedeco/javacv#1224) - Expose all platform properties to process executed with
Builder.buildCommandvia environment variables, with names uppercase and all.replaced with_ - Let
Parseradd@Nameor@Namespaceannotations to non-translated enumerators as well - Make
Parserpick up the names of type aliases for function pointers declared withusingand preventNullPointerException - Fix
Parserfailing on lambda expressions found inside member initialization lists of constructors - Add special support for
constexprvariables inParserby disabling their member setters automatically - Fix
Parsernot placing&and*at the right place inside template arguments containing function declarations - Support more basic containers in
Parserby comparing their names in a case-insensitive manner and add annotations missing from index types - Fix
Generatortaking the@By*annotation of the paired method for the index instead of the value argument of a setter - Fix
Parsersometimes considering global C++ identifiers starting with::as if they were local - Change default value for
Pointer.maxPhysicalBytestoPointer.maxBytes + Runtime.maxMemory()(pull #310) - Add
Loader.getVersion()andcheckVersion()to get versions of Maven artifacts and check against JavaCPP (issue #194) - Fix compile errors caused by
Generatoroccurring with callback functions returning a value by reference - Make
Builderexpand entries from the user class path with*as basename to all JAR files in the directory - Prevent
Loaderfrom creating symbolic links pointing to themselves by comparing withPath.normalize()(pull #307) - Fix
Loader.cacheResource()with the "jrt" protocol as used by jlink (pull #305) - Fix compiler error with
SharedPtrAdapterandUniquePtrAdapterin callback functions (pull #304) - Start
Pointer.DeallocatorThreadwithsetContextClassLoader(null)as required by containers (issue deeplearning4j/deeplearning4j#7737) - Add
-printcommand line option to access platform properties externally, for example, inside build scripts - Add to
InfoMapdefault pointer and value types forssize_t,char16_t,char32_t,std::u16string, andstd::u32string - Support multiple instances of
FunctionPointersubclasses, 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 byBuilder - 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 haveLoaderconsider 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)
- Have
Parseroutputsetteras dummy parameter name for setter methods to clarify usage - Add
Indexer.strides(long... sizes)and use as default strides when not specified by the user - Add
long...constructors, getters, and setters toCLongPointerandSizeTPointerfor convenience - Fix some
Generatorissues withFunctionPointerpassed or returned@ByPtrPtr - Use ModiTect to compile
module-info.javawith JDK 8 and preserve backward compatibility - Add
platform.executableandplatform.executablepathproperties to bundle executables and extract them withLoader.load() - Create symbolic links for all libraries preloaded by
Loaderas they get loaded to satisfy libraries like MKL - Prevent
ClassCastExceptioninLoaderon illegal system properties (issue #289) - Fix
Parsernot replacing all type names of the base class withInfo.flatten(issue #288) - Let
BuildMojoreturn to the Maven project the detected host platform as${javacpp.platform.host} - Have
BuildMojooutput a JPMS friendly name for the platform and extension back to the Maven project as${javacpp.platform.module} - Add
Builder.cleanoption to delete theoutputDirectorybefore generating files - Let
Parserpick upInfoexplicitly for all constructors by considering their names as functions (issue #284) - Fix
Parsernot always generating files using the simple names of classes - Add a
BuildMojo.targetDirectoriesparameter to allow setting multiple directories where to find generated Java files - Add
Parsersupport for attributes appearing afterstructdeclarations (issue bytedeco/javacpp-presets#685) - Fix
ParseroverlookingInfofor constructors inside namespaces or templates (issue #284) - Fix
Parserapplying someInfo.annotationsat the wrong place (issue #284) - Make
Parserbehave the same with@Propertieshaving only one out ofglobalortargetvalue set - Enhance
UniquePtrAdapterwith the ability to move pointers out with the&&operator - Let
Parsermap constructors also for abstract classes withInfo.virtualize - Fix
Parsertaking theglobalpackage as thetargetpackage even when both are set - Consider
@Properties(global=..., helper=...)class names without "." as relative totarget(pull bytedeco/javacpp-presets#669) - Use regex in
Parserto translate more Doxygen commands into Javadoc tags (pull #278 and pull #281) - Do not let
Parsermapoperator=()when prefixing container name withconst(pull #280)
- Allow users to override platform properties via system properties starting with "org.bytedeco.javacpp.platform."
- Have
BuildMojooutput its class path back to the Maven project as${javacpp.platform.artifacts} - Fix potential
NullPointerExceptioninLoader.findResources()under the bootstrap class loader - Add
size()andstride()methods toIndexerfor convenience - Let
Parserskip over C++11 style{ ... }member initializer lists (pull bytedeco/javacpp-presets#642) - Fix
Parsernot picking upInfofor castoperatordeclarations withconst,&, or*(issue bytedeco/javacpp-presets#377) - Add validation for
Builder.environmentVariablesto preventNullPointerExceptioninexecuteCommand() - Update
android-arm-clang.propertiesandandroid-x86-clang.propertiesto API level 21 (Android 5.0) for consistency and forward compatibility - Replace calls to
Class.getResource()withLoader.findResource()to work around issues with JPMS (pull #276) - Enhance
Loader.findResources()withClass.getResource()and search among parent packages - Take longest common package name among all user classes for the default output path of
Builder - Add
Bfloat16Indexerto accessshortarrays asbfloat16floating point numbers - When
Indexer.sizes.length != 3, return -1 forrows(),cols(),width(),height(), andchannels()(pull #275) - Synchronize
Loader.cacheResources()onRuntimeto avoidOverlappingFileLockExceptionwith multiple class loaders (issue bytedeco/javacpp-presets#650) - Annotate
BuildMojoasthreadSafe - Fix
Generatorerrors for@StdStringand other@Adapteron@Virtualreturn values - Use simple name from
@Properties(target=..., global=...)class as default for@Platform(library=...)name - Make sure
Generatordoes not usepositionof@Opaque Pointeroutput parameters with@Adapter(pull bytedeco/javacpp-presets#642) - Prevent
Builderfrom trying to usePointeras library name for the output - Add
Builder.generateoption and correspondingParseMojoto prioritize parsing header files - Fix
Parsermapping ofconstfunction pointer variable declarations - Enhance
Loader.cacheResource()with support for HTTP connections - Add
module-info.javaand create a multi-release JAR to comply with JPMS (pull #252) - Prevent
Parserfrom outputting twice the sameInfo.javaTextby using it as declaration signature - Provide default
Infoforstd::string*andstd::wstring*mapping toBytePointer, andCharPointerandIntPointer - Ensure
Parserskips over attributes of friend declarations or function definitions that are not used - Do not let
Parseroutput@Overridewhen overloading a method with less parameters using default arguments - Allow
Builderto executejavacandjavafor convenience, and remove "." from class path (issue #192) - Enhance support for
java.nio.Bufferby taking into accountoffset,position,limit, andcapacityon function calls - Make sure
Parseralways uses the short version of identifiers for Java class declarations - Prevent
Parserfrom inheriting constructors withusingwhen not accessible or of incomplete template instances - Add default
Infoto mapnoexceptattribute from C++11 to@NoExceptionannotation - Fix
Parserfailures on variadic function template arguments...and destructor attributes (pull bytedeco/javacpp-presets#622) - Add
@Properties(global=...)value to allowParserto target Java packages (pull #252) - Fix
Generatoroutput for@Constparameters of function pointers
- Add support for
linux-mips64elwithlinux-mips64el.properties(pull #268) - Enhance
Generatorwith@ByPtrfor primitive types and@NoExceptionforFunctionPointermethods - Add
BooleanPointerandBooleanIndexerto access arrays of boolean values withsizeof(jboolean) == 1 - Let
Parserskip overstatic_assert()declarations of C++11 - Fix
android-arm-clang.propertiesandandroid-x86-clang.propertiesfor builds with NDK r18 (pull #263) - Add to default
InfoMapmissingintvalue type andIntPointerpointer type forwchar_t - Add
Loader.getLoadedLibraries()method for debugging purposes and fix flakyBuilderTest(issue #245) - Call
PointerScope.attach()as part ofPointer.deallocator(), instead ofinit(), to support custom deallocators as well - Fix
Parserfailing when a value of anstd::pairbasic container is also anstd::pair(issue bytedeco/javacpp-presets#614) - Fix build issues with
android-armand recent versions of the NDK (pull #256) - Add
platform.preloadresourceproperty to be able to preload libraries from other Java packages - Make
Builderaccept multiple options forplatform.link.prefixandplatform.link.suffix(pull #250) - Let
Loaderrename JNI libraries when "already loaded in another classloader" (issue deeplearning4j/deeplearning4j#6166) - Add new
@CriticalRegionannotation to allow zero-copy access to data of Java arrays (pull #254) - Allow
Builderto create links for resource libraries even when no Java classes are built - Fix
Loader.cacheResource()creating a subdirectory named "null" when caching a top-level file - Update
README.mdwith references to newly published Basic Architecture of JavaCPP and Mapping Recipes for C/C++ Libraries - Prevent
Parserfrom appending annotations to setter methods of variables and for basic containers to satisfy theGenerator - Have
Parserwrap theinsert()anderase()methods of basic containers to allow modifying lists and sets - Let
Parsercreate mutable instances of map containers withoutconstprefix (issue bytedeco/javacpp-presets#595) - Fix
Parsersometimes ignoringdefineofconstcontainers (pull bytedeco/javacpp-presets#547) - Explain the purpose of the
intern()methods generated for Java enums - Clarify that
Loader.load()can throwUnsatisfiedLinkErrorwhen interrupted - Synchronize
Loader.loadLibrary()to fix potential race condition (pull #246)
- Add
Loader.getJavaVM()method to get the JNIJavaVMobject as required to initialize some libraries - Fix
Parserfrom outputting accessors not available withstd::forward_listorstd::list - Use
pthread_setspecific()inGeneratorto detach automatically native threads on exit for Android (pull #243) - Fix issues with anonymous classes by calling
getEnclosingClass()instead ofgetDeclaringClass() - Add
android-arm-clang.properties,android-arm64-clang.properties,android-x86-clang.propertiesandandroid-x86_64-clang.properties - Search in
linkpathbeforepreloadpathto avoid copying or loading unwanted libraries - Fix
Buildernot bundling libraries containing a#fragment only useful at load time - Make
Parsertake into account implicit constructors even when inheriting some withusingdeclarations - Pick up
Parsertranslation of enum and macro expressions fromInfo.javaNames - Let
ParserdefineInfo.pointerTypesalso for partially specialized templates with default arguments - Tweak
Pointer.formatBytes()to increase the number of digits returned (issue #240) - Enhance
InfoMapandStringAdapterwith default mappings and casts forstd::wstring - Templatize
StringAdapterto allow other character types likewchar_tand add corresponding@StdWStringannotation - Prevent
Loaderfrom creating symbolic links to rename libraries, which does not always work - Fix memory leak that occurs with "org.bytedeco.javacpp.nopointergc" (issue #239)
- Make
GeneratoruseGENERIC_EXCEPTION_TOSTRINGmacro onGENERIC_EXCEPTION_CLASSinstead of the defaultwhat() - Fall back on Android-friendly
System.loadLibrary()inLoader.load()instead of "java.library.path" (issue bytedeco/javacv#970) - Add to Java enums an
intern()method and use it intoString()to return non-null strings - Add
PointerScopeto manage more easily the resources of a group ofPointerobjects - Fix
Parserfailing onconst void*&or similar function arguments, and on constructors of class templates - Add
Info.skipDefaultsto have theParserignore default function arguments and prevent method overloading - Accelerate copy and extraction of resources by using larger buffers for file operations
- Fix
Parserincorrectly referring to function arguments with impossibly qualified names - Allow using
new Info().enumerate()to map all C++enumto Javaenumtypes by default - Fix
Parserissues surrounding enum classes, anonymous namespaces, and pure virtual classes - Avoid
synchronizedon first call tophysicalBytes()inPointer.deallocator()to reduce contention (pull #232)
- Enhance
Loader.createLibraryLink()by allowing to create symbolic links in other directories - Fix
Parserfailing onenumdeclarations where the first line is a macro (issue #230) - Make call to
Pointer.physicalBytes()thread safe and remove lock (issue #231) - Add
Info.enumerateto letParsermap C++ enum classes to Java enum types (issue #108) - Prevent
Loaderfrom loading twice copies of the same DLL (issue deeplearning4j/deeplearning4j#4776) - Add a
BuildMojo.targetDirectoryparameter to set a directory containing Java files generated bybuildCommand - Fix missing
jnijavacpp.cppwhen processing classes from different packages (issue #228) - Enhance
Loader.addressof()by making it try harder to find symbols on Linux and Mac OS X - Add
get()andtoString()methods to basic containers defined inParser - Fix
ParserignoringInfo.defineand other information for macros actually defined - Fix
SharedPtrAdapterandUniquePtrAdapterfailing to take ownership of temporary objects - Fix properties for
android-arm64andandroid-x86_64platforms that need API level 21 - Add "org.bytedeco.javacpp.pathsfirst" system property to let users search "java.library.path", etc before the class path
- Add
Parsersupport for_Bool,_Complex,_Imaginary,complex,imaginarytypes from C99 - Fix
Generatorincorrectly splitting type names for template arguments containing function types - Fix
NullPointerExceptioninBuilderwhen copying resources for static libraries - Let
Generatorpick up@NoExceptionannotations from super classes as well - Add
-stdlib=libc++option to iOS properties, required byclang++to support C++11 (pull #221) - Make it possible to define read-only containers with
Parserby prependingconst(issue #223) - Fix
Parserfailure of variable or function declarations on names starting with::, among other various small issues - Access elements of basic containers defined in
Parserwithat()instead ofoperator[](issue #223) - Add third element to
@Constannotation to supportvirtual constfunctions (pull #224) - Create more symbolic links to libraries preloaded by
Loaderto satisfy libraries like MKL - Work around in
Builderthe inability to pass empty arguments on Windows - Catch more exceptions that can occur in
Loaderwhen caching resources (pull #226) - Add
.aas an allowed library extension for iOS so they can get bundled - Fix
Parserfailing on variables with direct list initialization{ ... }(issue #223) - Allow
Parserto map and cast function pointers toPointer
- Output to log all commands executed for
Builder.buildCommandviaProcessBuilder - Switch architecture in
android-arm.propertiesto ARMv7-A - Fix
Parsernot producing@Castannotations for types withInfo.cast()onoperator(), as well as failing onusing operatorstatements - Fix
Parserissue with multiple container types (std::vector, etc) getting mixed up when mapped to adapters (@StdVector, etc) - Fix "Negative Buffer Capacity" errors happening in subclasses on
Pointer.asBuffer()(issue deeplearning4j/deeplearning4j#4061) - Prevent
JNI_OnLoad()from failing whenLoader.putMemberOffset()cannot find a class - Throw clear error message when
Loader.load()gets called on a class not supporting current platform - Create symbolic links to libraries preloaded by
Loaderas needed on Mac for renamed libraries - Update platform properties to support recent versions of the Android NDK
- Fix
Generatorissues with@ByPtrPtrreturn ofStringorPointertypes (issue bytedeco/javacpp-presets#499) - Define
clear(),empty(),pop_back(), andpush_back()for resizable basic containers inParser(issue bytedeco/javacv#659) - Add "nowarnings" option for the
@Platform(compiler=...)value to suppress all warnings - Have
Buildergenerate base JNI functions intojnijavacpp.cppfor better iOS support (issue #213) - Output single value setters for containers in
Parserto avoid surprises (issue #217) - Add
Parsersupport for C++11usingdeclarations inheriting constructors (issue bytedeco/javacpp-presets#491) - Fix compiler error when defining
std::setorstd::unordered_setwithParser - Make
ParserhonorInfo.skip()for enumerators and function pointers as well - Add
LoadEnabledinterface to allow classes to modify theirClassPropertiesat runtime - Move
sizeof()andoffsetof()data to global variables to preventStackOverflowErrorinJNI_OnLoad()(issue bytedeco/javacpp-presets#331) - Propagate within
Parsertype information from macros to other macros referencing them - Add support for
JNI_OnLoad_libname()naming scheme for iOS via newplatform.library.static=trueproperty - Improve the clarity of error messages on
Parserfailures - Fix
Parserissues with multipletypedefdeclarations in a single statement - Require
Info.annotations("@Name")to pick up alternate names from attributes - Add
@Platform(exclude=...)annotation value to remove header files from inherited@Platform(include=... - Fix a few issues with
Parser, including missingPointerPointermember setters (issue bytedeco/javacpp-presets#478) - Fix potential race conditions and various issues with
Loaderthat could prevent libraries like MKL from working properly - Add
Loader.addressof()to access native symbols, usable via optionalValueGetter/ValueSetterinFunctionPointer - Add
BuildEnabledinterface to allowInfoMapperclasses to participate in the build - Try to use symbolic links in
Loader.load()for output filenames specified with the#character (useful for libraries like MKL) - Fix
Parserincorrectly resolving type definitions with classes of the same name in parent namespaces - Fix
Generatorcompile errors forconsttemplate types of@Adapterclasses using the@Castannotation - Call
Loader.createLibraryLink()when executing the user specifiedBuilder.buildCommandas well - Introduce new
platform.extensionproperty to manage more than one set of binaries per platform - Catch
SecurityExceptioninLoader.getCacheDir()(pull #198)
- Call
malloc_trim(0)afterSystem.gc()on Linux to make sure memory gets released (issue bytedeco/javacpp-presets#423) - Make public the
Pointer.formatBytes()andPointer.parseBytes()static methods - Use
Integer.decode()instead ofparseInt()on integer literals to support hexadecimal and octal numbers - Add
Builder.encodingoption to let users specify I/O character set name (issue bytedeco/javacpp-presets#195) - Prevent race condition that could occur in
Loader.cacheResource()(pull #188) - Fix potential compile errors with Android caused by superfluous
typedeffromGenerator(issue #186) - Fix
Parsertranslation of strings containing the "::" subsequence (issue #184) - Prevent
Parserfrom overwriting target classes when nothing was parsed - Fix
Parsererror on member variables with initializers plusInfo.skip()(issue #179) - Fix
Parserincorrectly recognizing values as pointers whenconstis placed after type (issue #173) - Add
Parsersupport for C++11usingdeclarations that act astypedef(issue #169) - Let
Parseraccept variables initialized with parentheses (issue #179) - Fix
Parserconfusion between attributes and namespace-less templates (issue #181) - Fix issue with
Loader.getCallerClass()when aSecurityManagercannot be created (issue #176) - Make it possible to rename enumerators of C++
enum class(issue #180) - Make the arbitrary resources available to process executed with
Builder.buildCommandvia theBUILD_PATHenvironment variable - Prevent
Parserfrom outputting setters forconstmember pointers - Add support for arrays of function pointers
- Let users bundle arbitrary resources, have them extracted in cache, and used as
includeorlinkpaths (pull #43) - Fix potential formatting issues with
OutOfMemoryErrorthrown fromPointer - Fix
Loader.getCallerClass()not using the output from theSecurityManager(pull #175) - Fix
Parsernot considering emptyclass,struct, oruniondeclarations as opaque forward declarations - Provide
ByteIndexerandBytePointerwith value getters and setters for primitive types other thanbyteto facilitate unaligned memory accesses - Add a
BuildMojo.buildCommandparameter that lets users execute arbitrary system commands easily withProcessBuilder
- Add new "org.bytedeco.javacpp.cachedir.nosubdir" system property to restore old behavior (issue #167)
- Prevent
Pointerfrom copying array data from NIO buffers that are also direct (issue bytedeco/javacpp-presets#380) - Fix
SharedPtrAdapterandUniquePtrAdapterof theGeneratorforconsttypes (issue #166) - Prevent
Loaderfrom loading system libraries, which causes problems on Android 7.x (issue bytedeco/javacv#617) - Make
Parserstrip return type annotations when namingFunctionPointer(issue #162) - Let
Pointerlog debug messages when forced to callSystem.gc() - Fix
Parserhandling ofstd::mapand of documentation comments containing the "*/" sequence - Add portable and efficient
totalPhysicalBytes(),availablePhysicalBytes(),totalProcessors(),totalCores(),totalChips()methods - Avoid
Loaderissues with spaces, etc in paths to library files (issue deeplearning4j/nd4j#1564) - Prevent
Generatorfrom creating duplicateusingstatements (pull #158) - Make
Pointer.asBuffer()thread-safe (issue #155)
- Fix broken
outputDirectoryproperty and corresponding-dcommand line option (issue #153) - Add
Loader.extractResources()andcacheResources()methods to extract or cache all resources with given name - Fix potential issues with
Parserrepeating the@ByPtrPtror@ByPtrRefannotations on parameters - To support Scala singleton objects better, consider as
staticmethods from objects that are notPointer - Allow
Loader.extractResource()andcacheResource()to extract or cache all files from a directory in a JAR file - Create version-less symbolic links to libraries in cache on those platforms where it is useful to link easily
- Use
java.io.tmpdiras fallback inLoader.getCacheDir(), and throw a clear exception on failure
- Print memory sizes in a human-readable format with
Pointer.formatBytes() - Map standard
malloc(),calloc(),realloc(), andfree()functions (issue #136)
- Fix
Loadererrors that could occur due to recent changes
- Improve
Loaderhandling of duplicate libraries found in different JAR files using symbolic links (useful for MKL, etc) - Prevent
Loaderfrom overwriting previously extracted and renamed libraries (issue deeplearning4j/nd4j#1460) - Allow users to define
NO_JNI_DETACH_THREADto prevent callbacks from reinitializing threads (issue #143)
- Add support for
decltype()declarations to theParser(issue #135) - Fix
Generatorwhen aFunctionPointercontains methods that start with "get" or "put" (issue #137) - Enhance
Parserto let users skip the default values of arguments, as well as classes when one base class is skipped - Fix
Parsernot properly mapping the type oflonganonymous enums - Take into account
conston function parameters when looking up inInfoMap, and fix some incorrectly translated macros into variables - Add to
InfoMap.defaultsmore names that are reserved in Java, but not in C++ - Add via
@ByPtrRefsupport for function pointers passed by reference, as well as support forInfo.javaTextwithtypedef - Make sure
Parserexhausts all combinations of method parameter types even with duplicates (issue bytedeco/javacv#518) - Make
Loadercache libraries (in~/.javacpp/cache/by default) instead of using temporary files (pull #120) - Have
Parserannotate theallocate()functions and not the actual constructors (issue bytedeco/javacpp-presets#297) - Fix
Parserhandling ofclass,struct, oruniontypes with variables declared in the same statement - Add missing
platform.linktopsapirequired by some versions of Visual Studio (issue bytedeco/javacpp-presets#298) - Make sure default values placed in
nullValueby theParserhave the right type (issue bytedeco/javacv#518) - Accelerate call to
Pointer.physicalBytes()on Linux (issue #133) - Fix
Parserincorrectly skipping over some template function declarations - Allow C++ types to be prefixed by
class,struct, orunionto work around name clashes (pull bytedeco/javacpp-presets#266) - Properly expand the special predefined
__COUNTER__macro (pull bytedeco/javacpp-presets#266) - Create all missing directories in the paths to the source files created by
Generator
- Insure
Parserproperly ignores theauto,mutable,register,thread_local, andvolatileC++ keywords for storage classes - Fix
GeneratorandParserfor types likestd::unordered_map<std::string,std::pair<int,int> >(pull bytedeco/javacpp-presets#266) - Add
std::forward_list,std::priority_queue,std::unordered_map, andstd::unordered_setto the list of "basic/containers" inInfoMap - Work around
linux-armhfnot being properly detected with OpenJDK (issue #105) - Fix
Parsernot accepting namespace aliases with::tokens in them (issue bytedeco/javacpp-presets#265) - Add "org.bytedeco.javacpp.maxphysicalbytes" system property to force calls to
System.gc()based onPointer.physicalBytes() - Allow strings ending with "t", "g", "m", etc to specify the number of bytes in system properties (issue #125)
- Add
Info.linePatternsto limit the lines from header files that theParserhas to process - Introduce "platform.compiler.hardfpu" option inside
android-arm.propertiesto targetarmeabi-v7a-hard - Add
UniquePtrAdapterand corresponding@UniquePtrannotation to supportunique_ptrcontainers (pull bytedeco/javacpp-presets#266) - Fix
Parsernot expectingfriend classdeclarations that start with::(pull #122) - Synchronize memory allocation in
Pointerto avoidOutOfMemoryErrorwhen low on memory - Make it clear that
Indexable.createIndexer()can throw aNullPointerException(issue bytedeco/javacv#437) - Escape quotes when parsing default value for the
nullValueof@ByRefor@ByVal(pull #119) - Let
Parseraccept identifiers in addition to integer literals for bit fields (issue #118) - Fix
Loader.load()not renaming a library when previously loaded under a different name
- Add support for data member pointers as pseudo-
FunctionPointer(issue #114) - Change the packaging type to
jarsincemaven-plugincauses issues with sbt and Ivy (issue #113) - Include new
platform.compiler.debugoptions inside the default properties file (pull #90) - Always use the
platform.compiler.defaultoptions unless@Platform(compiler="!default", ...)is specified - Move optimization options from
platform.compiler.outputtoplatform.compiler.default, allowing users to override - Create all missing directories in the path to the target file of
Parser - Parse properly custom
enumtypes, found after the ':' token in C++11 - Output compiled libraries to user specified class path by default for input classes inside JAR files, etc
- Add
HalfIndexerto accessshortarrays as half-precision floating point numbers
- Prevent creating unnecessary garbage when using
Indexeron simple arrays with a stride of 1 (issue deeplearning4j/nd4j#1063) - Add "org.bytedeco.javacpp.maxretries" system property, the number times to call
System.gc()before giving up (defaults to 10) - Deallocate native memory in a dedicated thread to reduce lock contention (issue #103)
- Fix Javadoc links for externally referenced classes
- Prevent Android system libraries from getting copied or extracted
- Insert in
Indexeranindexablefield optionally set by the user for convenience - Fix potential
ParserExceptionon comments found after annotations before function declarations - Fix
IndexerTestpotentially failing withOutOfMemoryError(issue bytedeco/javacpp-presets#234) - Preload libraries to work around some cases when they refuse to load once renamed (issue deeplearning4j/libnd4j#235)
- Fix compilation error on some
linux-ppc64leplatforms (issue deeplearning4j/libnd4j#232) - Make sure
GeneratordefinesJavaCPP_getStringBytes()to handle exception messages when using callbacks
- Fix
Loadercrashing on Android (issue bytedeco/javacv#412) - Fix
NullPointerExceptionon "generic" platforms - Throw
OutOfMemoryErroronallocateArray()forPointerof primitive types withsize > 0 && address == 0(issue deeplearning4j/nd4j#960) - Add the ability the specify, after a
#character, the output filename of libraries extracted byLoader.load() - Consider
FunctionPointerannotated with empty@Namespaceas non-member function pointers (issue #99)
- Fix
NullPointerExceptioninBuilderon invalidjava.homesystem property or inaccessible directories - Add parameters to
Loader.load()offering more flexibility over the platform properties and library paths - Treat all
StringwithCharset.defaultCharset()(or defineMODIFIED_UTF8_STRINGfor old behavior) (issue #70) - Fix
NullPointerExceptioninParseron variadic templates (issue #81) - Fix
Loader.load()error when called right afterBuilder.build()within the same process - Lower Maven prerequisite in the
pom.xmlfile to 3.0 (issue #93) - Use
Info.cppTypesfor allParsertype substitutions, in addition to macros and templates (issue bytedeco/javacpp-presets#192) - Make
Parsertake into account Java keywords not reserved in C++, casting issues withint64_t, andconstvalue types in basic containers - Let users define
NATIVE_ALLOCATORandNATIVE_DEALLOCATORmacros to overload globalnewanddeleteoperators - Map
jinttointandjlongtolong longon Windows as well as all platforms with GCC (or Clang) - Fix corner cases when checking for the platform in
GeneratorandParser - Link libraries with "-z noexecstack" on Linux as recommended by HotSpot (pull #90)
- Set the internal DT_SONAME field in libraries created for Android (issue bytedeco/javacpp-presets#188)
- Add "org.bytedeco.javacpp.maxbytes" system property, forcing a call to
System.gc()when this amount of memory tracked with deallocators is reached - Let
Parserpick upInfo.annotationsin the case of function pointers as well - Add
@Convention(extern=...)value to haveGeneratorproduceFunctionPointerwith other language linkage than "C" - Enhance the
indexerpackage withlongindexing, initially via thesun.misc.Unsafe, for now - Lengthen the
position,limit, andcapacityfields ofPointerusinglong - Prevent creating text relocations for shared libraries on Android, which are rejected by recent versions of the SDK
- Use the
outputDirectoryas the compiler's working directory (pull #89) - Comment with first dimension of multidimensional array inside
@Cast(pull #87) - Remove
throws ExceptionfromPointer.close()since destructors do not typically throw exceptions (pull #86) - Add
-nodeleteflag to keep generated C++ files after compilation (pull #85) - Annotate functions originating from
cincludewith@NoException(pull #84) - Call
JNI_ABORTon release ofconstarrays (pull #83) - Add support for C++11
defaultanddeleteon function declarations (issue #80) - Add support for C++11 typed
enum, with or without enumerator list (issue #78) - Add missing space for
consttypes when normalizing template arguments inParser(issue bytedeco/javacpp-presets#165) - Make
Builderfail onClassNotFoundExceptionorNoClassDefFoundErrorinstead of logging warnings - Allow
Builderto generate native libraries with empty@Platformannotation even without user definednativemethods - Enhance
Parserto support a bit better&&tokens and C++11 rvalue references (issue bytedeco/javacpp-presets#160) - Add properties for the
linux-armhf,linux-ppc64, andlinux-ppc64leplatforms, and pick upmacosxwhenos.nameisdarwin - Fix
NullPointerExceptioninParseron unexpected forms of function pointers (issue #70) - Make sure
Generatorproduces calls tosizeof()andoffsetof()for allPointerclasses with allocators - Let
Parseruse adapters in the case ofFunctionPointeras well (issue bytedeco/javacpp-presets#145) - Prepend "javacpp." to all properties associated with Maven in
BuildMojoto avoid name clashes - Let users define the
GENERIC_EXCEPTION_CLASSmacro (default ofstd::exception) to indicate the base exception thrown by native methods - Split type names at
::delimiters before mapping them against templates inParser - Fix swallowed
InterruptedException(issue bytedeco/javacv#315) - Adjust a few things in
Generatorpreventing@Virtualfrom working properly in some cases (issue bytedeco/javacpp-presets#143) - Fix
TokenIndexerinserting an invalid token while expanding macros ending with a backslash (issue #63) - Make
ParsertakeInfo.skipinto account forenumdeclarations as well - Improve the performance of
BytePointer.getString()by usingstrlen() - Prevent
Generatorfrom initializing classes when preloading them, which can cause problems (issue bytedeco/javacpp-presets#126) - Add
Info.flattento duplicate class declarations into their subclasses, useful when a subclass pointer cannot be used for the base class as well - Prevent
Loaderfrom extracting libraries more than once, which can cause problems (issue bytedeco/javacpp-presets#126) - Make
Indexer implements AutoCloseableto let us try-with-resources - Add missing calls to
close()forInputStreamandOutputStreaminLoader(issue #53) - Remove
Piperclass no longer needed with Java SE 7 - Let
Parserplace appropriateInfo.javaText()provided by users in the case of destructors as well - Fix the
Parserskipping over some declarations by mistake and producing invalid comments for macros - To let users specify
...varargs asInfo.pointerTypes(), have theParserreplace them with array[]when not found on the last parameter - Enhance basic support for containers of the style
std::vector<std::pair< ... > >with user-friendly array-based setter methods - Fix
Generatornot passing function objects even when annotatingFunctionPointerparameters with@ByValor@ByRef - Map
bool*toboolean[]tentatively inParsersincesizeof(bool) == sizeof(jboolean)on most platforms - Allow
Parserto generate@Cast()annotations and overloadedput()methods in basic containers too - Move list of basic containers and types to
Info.cppTypesof the "basic/containers" and "basic/types"InfoMapentries, letting users change them at build time - Fix some
Parserissues withtypedefand forward declarations insideclassdefinitions - Insure
Parsermaps 64-bit values in C++enumtolongvariables (issue #48) - Fix
Generatortrying to cast improperly objects on return from@Virtualfunctions - Make
Parsertakeconstexpr,nullptr, andnamespacealiases into account, and fix a couple of preprocessing issues withTokenIndexer - Fix primitive arrays and NIO buffers not getting updated on return when used as arguments with adapters (issue bytedeco/javacpp-presets#109)
- Enhance a bit the conversion from Doxygen-style documentation comments to Javadoc-style
- Remove class check in allocators, which prevented peer classes from being extended in Java, instead relying on
super((Pointer)null)in child peer classes, and remove confusing and now unnecessary empty constructors
- Make
Generatoruse actual C++ operators for commonly overloaded ones instead of callingoperator??()functions, for better portability - Fix potential race condition when deallocating
Pointerobjects from multiple threads - Add logging to
Loader.loadLibrary()to help diagnose loading problems (issue #41) - Provide new
@Platform(pragma=...)value to haveGeneratoroutput#pragmadirectives - Upgrade all Maven dependencies and plugins to latest versions, thus bumping minimum requirements to Maven 3.0
- Add new "org.bytedeco.javacpp.cachedir" system property to specify where to extract and leave native libraries to share across multiple JVM instances
- Provide
@Virtual(true)to specify pure virtual functions and preventGeneratorfrom making undefined calls - Update properties for Android to detect undefined symbols at compile time, instead of getting errors only at runtime
- Log when
Pointer.deallocatorgets registered, garbage collected, or deallocated manually, ifLogger.isDebugEnabled()(redirectable to SLF4J) - Make
Pointer implements AutoCloseableto let us try-with-resources, thus bumping minimum requirements to Java SE 7 and Android 4.0 - Introduce the concept of "owner address" to integrate
Pointertransparently withstd::shared_ptr, etc (Thanks to Cyprien Noel for the idea!) - Add new "cpp11" option for the
@Platform(compiler=...)value to build against the C++11 standard - Fix
Parsersupport for theinterfacekeyword of the Microsoft C/C++ Compiler - Let
Parserpick up names fromInfo.pointerTypesin the case of function pointers as well - Add new "org.bytedeco.javacpp.nopointergc" system property to prevent
Pointerfrom registering deallocators with the garbage collector - Add
@Properties(names=...)value to specify a list of default platform names that can be inherited by other classes - Fix a couple of
Parserissues on complex template types (issue #37) - Take into account
Buffer.arrayOffset()when creating aPointerfrom a buffer backed by an array (issue bytedeco/javacv#190) - Fix some incorrectly translated comments in
Parser(issue #32) - Add
Parsersupport for thestd::bitset"container", and a bug involving simple types and skipped identifiers - Properly parse overloaded
newanddeleteoperators,frienddeclarations, and default constructors with an explicitvoidparameter (issue #31) - Fix a couple of potential
NullPointerExceptioninParser(issue #30) - Have the
Parserwrap theiteratorof some standard C++ containers when useful - Use Clang as the default compiler for Mac OS X and iOS (via RoboVM)
- Adjust
BytePointer,CharPointer,IntPointer, andStringAdapterto work with data strings that are not null-terminated (issue #24) - Forbid
Parserfrom producingabstractclasses, preventing C++ factory methods and such from working properly (issue #25) - Fix crash when trying to create objects from abstract classes, to let the exception be thrown on return (issue #26)
- Switch to GCC 4.9 by default on Android, probably dropping support for Android 2.2, because GCC 4.6 has been dropped from the NDK since r10e
- Insure
Generatorcasts properly tojweakwhen callingDeleteWeakGlobalRef()(issue #23)
- Add
-undefined dynamic_lookupoption to Mac OS X compiler, making its native linker behave a bit better, plus search for libraries suffixed with ".so" too - Add missing
@Platform(frameworkpath=...)value and corresponding property to set custom framework paths for the linker - Add
Parsersupport for theinterfacekeyword of the Microsoft C/C++ Compiler - Fix
Generatorperformance issue on classes with a lot of methods (issue bytedeco/javacpp-presets#36) - Offer the Apache License, Version 2.0, as a new choice of license, in addition to the GPLv2 with Classpath exception
- Fix
NullPointerExceptionwhen trying to process aninterfaceclass - Fix
Parsererrors on unnamednamespaceblocks, preprocessor directives with comments, and empty macros - Introduce a
nullValueto@ByRefand@ByValannotations to let us specify what to do when passednull - Add properties for
android-arm64,android-x86_64, andlinux-arm64platforms - Add slow but generic
Indexer.putDouble()to complement existingIndexer.getDouble()(useful for testing) - Fix and enhance in various ways the support of
ParserandGeneratorfor function pointers, virtual functions, and abstract classes - Improve
Parsercheck forconstreferences and pointers required to output appropriate@Constannotation - Add
Info.purifyto force theParserin producing abstract classes - Let
StringAdapter(via the@StdStringannotation) supportstd::string*, that is to say, pointers to strings - Fix
Tokenizerfailing on some character and string literals - Fix
Parsererrors caused by constructors intypedef structconstructs, included nested ones, and skip over pointer names too (issue bytedeco/javacpp-presets#62) - Generalize
Info.virtualizeto let non-pure virtual functions get annotated with@Virtual native - Make
VectorAdapterwork even with elements that have no default constructor - Add
Parsersupport forstd::pairas a sort of zero-dimensional container type - Fix
Parsercrash on empty comments (issue #14)
- Clarify with documentation comments various constructors produced by the
Parser - Add
SharedPtrAdapterand corresponding@SharedPtrannotation to supportshared_ptrcontainers - Fix a few small issues and work around a few additional corner cases with the
Parserand theGenerator - Provide
UByteIndexerandUShortIndexer, treating array and buffer data as unsigned integers, for ease of use - Clean up Windows
java.io.tmpdireven when program messes withjava.class.path(issue #12) - In addition to direct NIO buffers, also accept as function arguments non-direct ones backed by arrays (issue bytedeco/javacpp-presets#36)
- Fix
@Virtualcallback functions defined inside a@Namespace - Adjust
TokenIndexerandParserto handle#if,#ifdef,#ifndef,#elif,#else, and#endifpreprocessor directives more appropriately, even when placed in the middle of declarations - Append
@Documentedto annotation types to have them picked up by Javadoc - Fix
friendfunctions not getting skipped by theParser - Add
Infofor__int8,__int16,__int32, and__int64toInfoMap.defaults
- Fix multiple "platform.preload" or "platform.preloadpath" properties not getting considered by the
Loader - Fix some
Parserexceptions on valid declarations with template arguments, macro expansions, or overloaded cast operators, and makeInfo.javaNameusable in the case ofenum - Disable DocLint, which prevents the build from succeeding on Java 8 (issue #5)
- Add new
indexerpackage containing a set ofIndexerfor easy and efficient multidimensional access of arrays and buffers (issue javacv:317) - Use
Long.decode()inside theTokenizerto test more precisely when integer values are larger than 32 bits - Have the
Parserproduce@Name("operator=") ... put(... )methods for standard C++ containers, avoiding mistaken calls toPointer.put(Pointer)(issue bytedeco/javacv#34) - Let the
ParserapplyInfo.skipin the case of macros as well - Remove warning log messages when using the
@Rawannotation - Let
@Virtual @MemberGetterannotated methods return member function pointers of functions defined with@Virtual, useful for frameworks like Cocos2d-x - Fix
NullPointerExceptionwhen leaving theincludePath,linkPath, orpreloadPathMojo parameter empty - Add
Info.virtualizeto have theParsergenerate@Virtual abstractfor pure virtual functions in the given classes - Add
@Virtualannotation and updateGeneratorto support callback by overriding such annotatednativeorabstractmethods - Add hack for
typedef void*definitions and parameters with a double indirection to them
- Fix
Generator.checkPlatform()not checking super classes - Add
includePath,linkPath, andpreloadPathparameters toBuildMojoto let Maven users append paths to the properties easily - In consequence, remove too arbitrary "local" paths from the default platform properties (issue #43)
- Fix a few other more or less minor issues in the
Parserwith thelong double,ptrdiff_t,intptr_t,uintptr_t,off_ttypes, floating-point numbers, macro redefinitions, access specifiers, casting of const values by reference, optional parentheses, const data types in templates, declarator names equal to a type name, friend functions, inline constructors,typedef voiddeclarations within namespaces, pointers to function pointers - Allow users to instruct the
Parserto skip the expansion of specific macro invocations - Let
Parserconcatenate tokens when expanding macros containing the##operator - Add some documentation for
Info,InfoMap,InfoMapper, andParser - Fix the
Parsernot filtering and expanding properly some preprocessor directives, as well as producing wrong code fortypedef struct * - Skip Java path search when building for Android to prevent including some random
jni.hfile (issue #3) - Fix the
Parserlosing some keywords likestaticon methods annotated with an@Adapter(issue #2) - Fix
Loader.load()not properly force loading all inherited target classes (issue #1)
- Move from Google Code to GitHub as main source code repository
- Place build-time classes in the
org.bytedeco.javacpp.toolspackage and bring out static nested classes, in an effort to avoid conflicts and ease development - Rename the
com.googlecode.javacpppackage toorg.bytedeco.javacpp - Added
public long Pointer.address()getter method, useful when one needs to subtract two pointers - Removed old NetBeans project files that cause a conflict when trying to open as a Maven project (issue javacv:210)
- Fixed compilation error on
FunctionPointerclasses containing no native callback methods - Added a
platform.library.pathproperty, such as "lib/armeabi/" in the case of the "android-arm" platform, to be used instead of "package/platform" (issue javacv:427) - Generalized references to the path of the Android NDK
- Improved a few small things in the set of
Pointerclasses - Introduced a simple
Loggerclass and unified the logging output calls around it - Unified the property names with the
@Propertiesand@Platformannotations into a consistent naming scheme - Continued to clean up the
Parserand improve the support of, for the most part, comments, enumerations, functions pointers, anonymousstructorunion, templates, overloaded operators, namespaces, standard containers, default parameter arguments, multiple inheritance, custom names of wrapped declarators, and helper classes written in Java - Annotations such as
@Adapteror@ByValare no longer ignored on parameters of getters or setters annotated with@Index - Fixed some other corner cases in
Generatorand a few potential issues with the hacks inLoader - Added for convenience to
PointerPointera generic parameter<P extends Pointer>and the associatedget(Class<P> ...)getters, as well asStringgetters and setters - Passing a
Classobject as first argument to a native method that returns aPointernow determines the runtime type of that returned object - Generalized somewhat more the compiler options used inside
linux-arm.properties(issue javacv:418) - Unified the function pointer type of native deallocators to
void (*)(void*) - Removed dependency on (efficient)
AllocObject()andCallNonvirtualVoidMethodA()JNI functions, which are not supported by Avian - Cleaned up and optimized
Generatora bit, also fixing a crash that could occur whenFindClass()returnsNULL
- Tweaked a few things to support RoboVM and target iOS, but
JNI_OnLoad()does not appear to get called... - Upgraded references of the Android NDK to version r9c
- Made
Loader.load()work, within reason, even when all annotations and resources have been removed, for example, by ProGuard - Fixed compile error when using a
FunctionPointeras parameter from outside its top-level enclosing class - Added new
Pointer.deallocate(false)call to disable garbage collection on a per object basis, allowing users to deal with memory leaks in other ways - Changed the default compiler option
-mfpu=vfpvfor ARM to-mfpu=vfpv3-d16, because the former is not supported by Tegra 2 (issue javacv:366) - Removed call to
Arrays.copyOf()inLoader.findLibrary(), which would prevent it from working on Android 2.2 (issue #39) - Fixed invalid code generated for
FunctionPointerparameters annotated with@Const @ByRef - Fixed
NullPointerExceptioninLoader.load()when no@Platformannotation is provided (issue #38) - Parsing for anonymous
structorunionand fortypedef void(mapped to@Opaque Pointer) now outputs something - The
Parsernow expands preprocessor macros, filters tokens appropriately, and outputs all unprocessed directives as comments - Improved the C++ support of the
Parserfor namespaces, derived classes, access specifiers, custom constructors, vector types, macros, templates, overloaded operators, etc - Fixed
typedefof function pointers and a few code formatting issues withParser - Supplied checks to prevent
Loader.load()from throwingjava.lang.IllegalStateException: Can't overwrite cause
- Added new very preliminary
Parserto produce Java interface files almost automatically from C/C++ header files; please refer to the new JavaCPP Presets subproject for details - When catching a C++ exception, the first class declared after
throwsnow gets thrown (issue #36) instead ofRuntimeException, which is still used by default - Fixed Java resource leak after catching a C++ exception
- Upgraded references of the Android NDK to version r9
- Added new
Builderoption "-copylibs" that copies into the build directory any dependent shared libraries listed in the@Platform(link={...}, preload={...})annotation Loader.getPlatformName()can now be overridden by setting thecom.googlecode.javacpp.platform.namesystem property- Refactored the loading code for
@Properties()into a neatLoader.ClassPropertiesclass, among a few other small changes inLoader,Builder,Generator, and the properties - Included often used directories such as
/usr/local/include/and/usr/local/lib/tocompiler.includepathandcompiler.linkpathdefault properties - New
@Properties(inherit={Class})value lets users specify properties in common on a similarly annotated shared config class of sorts - Fixed callbacks when used with custom class loaders such as with Web containers or frameworks like Tomcat and Play
- Fixed using
@StdString(or other@Adapterwith@Castannotations) on callbacks (issue #34), incidentally allowing them to return aString - By default,
Buildernow links to thejvmlibrary only when required, when using the-headercommand line option (issue #33) - Incorporated missing explicit cast on return values when using the
@Castannotation - Fixed duplicate code getting generated when both specifying the output filename with
-o <name>and using wildcards on packages containing nested classes - Let
Bufferor arrays of primitive values be valid return and callback arguments, mostly useful when used along with the@StdVectorannotation, or some other custom adapter
- Upgraded references of the Android NDK to version r8e
- Arguments of
Pointertype now get handled aschar*in cases when thepositioncan be used for arithmetic - Worked around bug of
InputStream.available()always returning 0 with thehttpprotocol inLoader.extractResource(URL)
- Fixed potential problem with methods of
FunctionPointerannotated with@Cast("const...") - Upgraded references of the Android NDK to version r8d
- Fixed callbacks not working on Android anymore (issue #30)
- Added some Javadoc to most of the code
- To help diagnose
UnsatisfiedLinkErrorthrown byLoader.load(), they have been augmented with a potential cause originating from the "preloading" of libraries, whose premature deletion has also been fixed - Provided new
@Platform(library="...")annotation value to let users specify the name of the native library used by bothBuilderandLoader, where different classes with the same name get built together, which also works on nested classes (issue #29) - Added the ability to change the name of the class of function objects created when defining a
FunctionPointerwith the@Nameannotation Builderwould go on a compile spree when all classes specified on the command line could not be loaded- Exported
Loader.isLoadLibraries(), which always returns true, except when theBuilderloads the classes - Made it possible to specify a nested class (with a '$' character in the name) on the command line
- When
Pointer.limit == 0, the methodsput(),zero(), andasBuffer()now assume a size of 1 - Fixed compiler error on 32-bit Mac OS X
- Added
Pointer.withDeallocator(Pointer)method to attach easily a customDeallocatorcreated out of astatic void deallocate(Pointer)method in the subclass, including native ones such as@Namespace @Name("delete") static native void deallocate(Pointer) - A name starting with "::", for example
@Name("::std::string")or@Namespace("::std"), now drops the remaining enclosing scope - Removed confusing
castvalue of@Adapterinstead relying on newString[]value of@Castto order multiple casts - Renamed various variables in
Generatorto make the generated code more readable - Fixed memory corruption when using an adapter or
@ByRefon a function that returns by value anstd::vector<>orstd::string(issue #26) - Added
Pointer.zero()method that callsmemset(0)on the range - For easier memory management, more than one
Pointernow allowed to share thedeallocatorwhen "casting" them - Upgraded references of the Android NDK to version r8b
- Fixed
JavaCPP_log()not printing correctly (issue #27) - Added functionality to access easily
FunctionPointercallbacks by their names from C/C++: We can annotate them with@Nameand build with the new-headeroption to get their declarations in a header file, while theBuilderlinks with thejvmlibrary by default Loadernow displays an informative error message when trying to use an undefinedcompiler.optionswith@Platform(options="")(issue #24)Pointer.deallocator()would needlessly enqueueDeallocatorobjects pointing to the nativeNULLaddress- Added support for C++ "functors" based on the
operator(), which gets used when annotating aFunctionPointermethod parameter with@ByRefor@ByVal - For convenience in Scala, added
apply()as an acceptable caller method name within aFunctionPointer, in addition tocall() - Fixed
@Castnot working along parameters with an@Adapteror when attempting toreturnthe argument Generatorwould ignorePointer.position()in the case of@ByPtrPtrand@ByPtrRefparameters- Replaced hack to create a
Pointerfrom aBufferobject with something more standard - Fixed
Loader.sizeof(Pointer.class)to return thesizeof(void*) - In addition to methods and parameters, we may now apply
@Adapterto annotation types as well, allowing us to shorten expressions like@Adapter("VectorAdapter<int>") int[]to just@StdVector int[], forstd::vector<int>support, and similarly for@StdStringandstd::string - Fixed callback parameter casting of primitive and
Stringtypes - An empty
@Namespacecan now be used to letGeneratorknow of entities that are not part of any scope, such as macros and operators - Turned
FunctionPointerinto anabstract classwithprotectedconstructors, but if users still try to use it as function parameters,Generatornow logs a warning indicating that a subclass should be used (issue #23) - Removed the
outvalue of the@Adapterannotation: All adapters are now "out" by default, unless@Constalso appears on the same element - Fixed
Pointer.equals(null)throwingNullPointerException(issue #22) @NoOffsetwould erroneously preventsizeof()operations from getting generated
- Fixed problems when trying to map
java.lang.Stringto other native types thanchar*, such asunsigned char* - JavaCPP now uses the
new (std::nothrow)operator for allocation, which guarantees that allocation of primitive native arrays won't throw exceptions, making it possible to build C++ exception free JNI libraries - Added new
Pointer.limitproperty, mainly useful to get thesizeof an output parameter, as returned by an adapter specified with the@Adapterannotation - Renamed the
capacityfield of an adapter tosizeas it now maps to bothPointer.limitandPointer.capacity(the latter only for new allocations) - Added
Pointer.put(Pointer)method, the counterpart ofBuffer.put(Buffer), to call the nativememcpy()function on twoPointerobjects - New
@NoExceptionannotation to reduce the size of generated code and optimize runtime performance of functions that are guaranteed not to throw exceptions, or for cases when we do not mind that the JVM may crash and burn - Trying to generate code for non-static native methods inside a class not extending
Pointernow generates proper warning (issue #19) - Fixed regression where the
@Adapternotation generates incorrect code for types other thanPointer(issue #20)
- Started using version numbers, friendly to tools like Maven, and placing packages in a sort of Maven repository (issue #10)
- Before loading a JNI library, the
Loadernow also tries to extract and load libraries listed in the@Platform(link={...}, preload={...})annotation values, and to support library names with version numbers, each value has to follow the format "libname@version" (or "libname@@version" to haveBuilderuse it for the compiler as well), where "version" is the version number found in the filename as required by the native dynamic linker, usually a short sequence of digits and dots, but it can be anything (e.g.: "mylib@.4.2" would map to "libmylib.so.4.2", "libmylib.4.2.dylib", and "mylib.4.2.dll" under Linux, Mac OS X, and Windows respectively) - All files now get extracted into a temporary subdirectory, and with the appropriate platform-dependent linker options, or with libraries patched up after the fact with tools such as
install_name_toolof Mac OS X, most native dynamic linkers can load dependent libraries from there - Stopped using
java.net.URLas hash key inLoader(very bad idea) - Changed the default value of the
@Indexannotation from 0 to 1, and fixed theGeneratorwhen it is used with member getters and setters - Renamed
mingw-*.propertiestowindows-*-mingw.propertiesfor consistency - Made the
Generatorallocate native heap memory for callback arguments passed@ByVal(in addition toFunctionPointer), rendering their behavior consistent with return@ByValin the case of function calls (issue #16) Generatornow usesstd::runtime_error(std::string&)instead of assuming that some nonstandardstd::exception(std::string&)constructor exists (issue #17)- Fixed
Generatorproducing incorrect code when applying invalid annotations such as@ByValon a method that returns something else than aPointerobject (issue #18)
- Added
pom.xmlfile andBuildMojoplugin class for Maven support and changed the directory structure of the source code to match Maven's standard directory layout (issue #10) Many thanks to Adam Waldenberg and Arnaud Nauwynck for their ongoing support with that! - Moved the source code repository to Git
- Created a new
@Rawannotation to use Java object as rawjobjectin C++, also passingJNIEnvand the enclosingjclassor thejobjectcorresponding tothis, as the first two arguments of the function, when theGeneratorencounters any@Raw(withEnv=true)(issue #13) - The
Buildernow handles more cases when some prefix or suffix property starts or ends with a space (issue #14) - Fixed syntax error in
VectorAdapter, which GCC and Visual C++ would still happily compile - Added new
source.suffixproperty to have the names of generated source files end with something else than.cppand support frameworks like CUDA that require filenames with a.cuextension to compile properly, such as used by the new*-cuda.properties, and also changed the "-cpp" command line option to "-nocompile" - New
Loader.loadLibrary()method similar toSystem.loadLibrary(), but before searching the library path, it tries to extract and load the library from Java resources Generatornow accepts@ConstonFunctionPointerclass declarations- Added new
@Adapter.cast()value to cast explicitly the output of a C++ adapter object - Upgraded references of the Android NDK to version r8
- Included new command line option "-Xcompiler" to pass options such as "-Wl,-static" directly to the compiler
- Made other various minor changes and enhancements
- Added new
compiler.frameworkproperty and corresponding@Platform.framework()value to allow easier binding with Mac OS X frameworks - Changed most
Buildererrors into warnings, letting the building process complete successfully more often - We may now use the
@NoDeallocatorannotation on a class to disable deallocation for all allocation methods
- Added new
@NoDeallocatorannotation to preventallocate()andallocateArray()methods from registering a native deallocator toPointerobjects (issue #1) Generatornow properly skips as unsupported array parameters that do not have a primitive component type, and logs a warning (issue #7)GeneratorandBuilderwould append the same include files, libraries, or options multiple times when not required: Fixed inLoader.appendProperty()(issue #8)- Moved the placement of the class-level @Index annotation to the getter and setter methods themselves
- To process all classes in a package, we may now specify as argument to the
Builderits name followed by ".*", in a similar fashion to theimportstatement of the Java language, or by ".**" to process recursively all packages, while omitting to specify any class or package results in JavaCPP processing all classes found under the directories or JAR files specified with the "-classpath" option (issue #12) - Equipped the
*Pointerclasses with new bulkget()andput()methods taking an array as argument, to compensate for direct NIO buffers lacking in performance on Android (issue #11)
- Cleaned up a few minor
Exceptionblocks - New
Pointer.deallocateReferences()static method to force immediate deallocation of all native memory allocated byPointerobjects that since have been garbage collected - Updated
android-arm.propertiesto reflect the fact that, starting from Android NDK r7,libstdc++.ahas been surreptitiously renamed tolibgnustl_static.a, such that JavaCPP was instead linking to a new boguslibstdc++.solibrary, causing runtime linking errors - Included new
android-x86.propertiesto compile binaries for that platform as well - Added new
compiler.sysroot.prefixandcompiler.sysrootplatform properties to pass options such as--sysrootto satisfy new rituals of the Android NDK starting from r7b - Upgraded references of the Android NDK to version r7b
- Added new
compiler.linkpath.prefix2platform property to pass options such as-Wl,-rpath,to linkers that support them - Fixed
Loader.load()on Android 4.0, whereSecurityManager.getClassContext()returnsnull - Upgraded references of the Android NDK to version r7
- Changed the following to make MinGW work:
Generatornow mapsjlongto the more standardlong longinstead of__int64type and also includesstdint.h, and added-D_JNI_IMPLEMENTATION_ -Wl,--kill-atto the compiler options, as recommended by MinGW's documentation for building DLLs compatible with JNI - Added hack for
AttachCurrentThread(), whose signature differs under Android, andDetachCurrentThread()now gets called as appropriate after returning from a callback function, to prevent memory leaks (and also crashes on platforms such as Android) (issue #3) Generatornow generates correct code for the annotation pairs@Const @ByRefand@Const @ByVal(issue #4)- Worked around callback functions crashing on Android, which is unable to load user classes from native threads (issue #5)
- Fixed a few potential pitfalls inside
GeneratorandLoader - Removed compiler warnings due to the type of the
capacitymember variable ofVectorAdapter - Callback
FunctionPointerobjects may now return@ByValor@ByRef - On Android, changed the output of runtime error messages from
stderr(equivalent to/dev/nullon Android) to the log
- Changed default option flag "/MT" to "/MD" (and a few others that Visual Studio uses by default) inside
windows-x86.propertiesandwindows-x86_64.propertiesbecausestd::vector,VectorAdapterand C++ memory allocation in general does not work well with static runtime libraries across DLLs under Windows Vista and Windows 7 for some reason, and because Microsoft fixed the manifest file insanity starting with Visual C++ 2010 Buildernow searches forjni.handjni_md.hinside/System/Library/Frameworks/JavaVM.framework/Headers/if not found insidejava.home, as with Mac OS X Lion (issue #2)- Upgraded references of the Android NDK to version r6b
- Fixed a few potential pitfalls inside
Generator - Added hack to let
*Pointerclasses with a corresponding*Bufferclass have constructors for them
Generatornow letsget()/put()(or theValueGetter/ValueSetterannotated) methods use non-integer indices for theIndexannotation- Removed calls to
Arrays.copyOf()insidegetString*()methods so they may work on Android as well - Fixed race condition that could occur in the deallocation code of
Pointerdue to incorrect synchronization platform.rootnow defaults to the current directory
- New
Adapterannotation that uses C++ classes such asVectorAdapter, which can let us use Java arrays orPointerobjects in place of C++ vector objects by mapping types such asvector<int>to@Adapter("VectorAdapter<int>") int[]or@Adapter("VectorAdapter<int>") IntPointer - Added new
Pointer.capacityfield to keep track of allocated size for arrays, needed by theAdapterannotation - Removed the
capacityparameter from thePointer.asByteBuffer()andPointer.asBuffer()methods, which now rely instead on the value of the newcapacityfield ValueGetterandValueSetter, defaulting to theget()andput()methods, now accept indices as arguments, and*Pointerclasses have been updated accordingly- New
Indexannotation to indicate that a C++ class, such asvector<T>implements theoperator[]that can be mapped to theValueGetterandValueSetteras well as to arbitrary function calls, taking the first n arguments as indices, where n is the value placed in the annotation - The
Nameannotation now accepts as value aStringarray to indicate names before and after these indices - New
Constannotation for convenience - Fixed scoping of static members inside namespaces and classes
- Added new
BoolPointerclass - Improved support of function pointers to generate more standard C++ and to make it work with things like member function pointers
- Inserted hack to call
std::string.c_str()when returned as@ByRef java.lang.String - Multiplied checks for invalid
NULLpointers - Upgraded references of the Android NDK to version r5c, which now also works on Android 2.1 or older (android issue #16008)
Loader.load()no longer requires a JVM that supports annotations to function properly
Generatornow outputs#include <stdio.h>, the lack of which prevents Android NDK under Windows from compiling
- Replaced arrays from constructors with variable-length argument lists for convenience
- Fixed a few small potential pitfalls previously overlooked
- Fixed directory search for
jni_md.h, which did not search deep enough in some cases - Added new
path.separatorproperty to set the path separator of the target platform, regardless of the build platform - Added hack to make sure the temporarily extracted library files get properly deleted under Windows
- Now loads classes more lazily
- Changed the paths for libstdc++ inside
android-arm.propertiesto the non "v7a" versions - Added new
platform.rootproperty to let users specify the path to their toolchains more easily
Initial release
This project was conceived at the Okutomi & Tanaka Laboratory, Tokyo Institute of Technology, where I was supported for my doctoral research program by a generous scholarship from the Ministry of Education, Culture, Sports, Science and Technology (MEXT) of the Japanese Government. I extend my gratitude further to all who have reported bugs, donated code, or made suggestions for improvements (details above)!