JavaCPP v1.2 Release Notes
Release Date: 2016-05-15 // almost 8 years ago-
- Fix
NullPointerException
inBuilder
on invalidjava.home
system property or inaccessible directories - Add parameters to
Loader.load()
offering more flexibility over the platform properties and library paths - Treat all
String
withCharset.defaultCharset()
(or defineMODIFIED_UTF8_STRING
for old behavior) (issue #70) - Fix
NullPointerException
inParser
on variadic templates (issue #81) - Fix
Loader.load()
error when called right afterBuilder.build()
within the same process - Lower Maven prerequisite in the
pom.xml
file to 3.0 (issue #93) - Use
Info.cppTypes
for allParser
type substitutions, in addition to macros and templates (issue bytedeco/javacpp-presets#192) - Make
Parser
take into account Java keywords not reserved in C++, casting issues withint64_t
, andconst
value types in basic containers - Let users define
NATIVE_ALLOCATOR
andNATIVE_DEALLOCATOR
macros to overload globalnew
anddelete
operators - Map
jint
toint
andjlong
tolong long
on Windows as well as all platforms with GCC (or Clang) - Fix corner cases when checking for the platform in
Generator
andParser
- 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
Parser
pick upInfo.annotations
in the case of function pointers as well - Add
@Convention(extern=...)
value to haveGenerator
produceFunctionPointer
with other language linkage than "C" - Enhance the
indexer
package withlong
indexing, initially via thesun.misc.Unsafe
, for now - Lengthen the
position
,limit
, andcapacity
fields ofPointer
usinglong
- Prevent creating text relocations for shared libraries on Android, which are rejected by recent versions of the SDK
- Use the
outputDirectory
as the compiler's working directory (pull #89) - Comment with first dimension of multidimensional array inside
@Cast
(pull #87) - Remove
throws Exception
fromPointer.close()
since destructors do not typically throw exceptions (pull #86) - Add
-nodelete
flag to keep generated C++ files after compilation (pull #85) - Annotate functions originating from
cinclude
with@NoException
(pull #84) - Call
JNI_ABORT
on release ofconst
arrays (pull #83) - Add support for C++11
default
anddelete
on function declarations (issue #80) - Add support for C++11 typed
enum
, with or without enumerator list (issue #78) - Add missing space for
const
types when normalizing template arguments inParser
(issue bytedeco/javacpp-presets#165) - Make
Builder
fail onClassNotFoundException
orNoClassDefFoundError
instead of logging warnings - Allow
Builder
to generate native libraries with empty@Platform
annotation even without user definednative
methods - Enhance
Parser
to support a bit better&&
tokens and C++11 rvalue references (issue bytedeco/javacpp-presets#160) - Add properties for the
linux-armhf
,linux-ppc64
, andlinux-ppc64le
platforms, and pick upmacosx
whenos.name
isdarwin
- Fix
NullPointerException
inParser
on unexpected forms of function pointers (issue #70) - Make sure
Generator
produces calls tosizeof()
andoffsetof()
for allPointer
classes with allocators - Let
Parser
use adapters in the case ofFunctionPointer
as well (issue bytedeco/javacpp-presets#145) - Prepend "javacpp." to all properties associated with Maven in
BuildMojo
to avoid name clashes - Let users define the
GENERIC_EXCEPTION_CLASS
macro (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
Generator
preventing@Virtual
from working properly in some cases (issue bytedeco/javacpp-presets#143) - Fix
TokenIndexer
inserting an invalid token while expanding macros ending with a backslash (issue #63) - Make
Parser
takeInfo.skip
into account forenum
declarations as well - Improve the performance of
BytePointer.getString()
by usingstrlen()
- Prevent
Generator
from initializing classes when preloading them, which can cause problems (issue bytedeco/javacpp-presets#126) - Add
Info.flatten
to duplicate class declarations into their subclasses, useful when a subclass pointer cannot be used for the base class as well - Prevent
Loader
from extracting libraries more than once, which can cause problems (issue bytedeco/javacpp-presets#126) - Make
Indexer implements AutoCloseable
to let us try-with-resources - Add missing calls to
close()
forInputStream
andOutputStream
inLoader
(issue #53) - Remove
Piper
class no longer needed with Java SE 7 - Let
Parser
place appropriateInfo.javaText()
provided by users in the case of destructors as well - Fix the
Parser
skipping over some declarations by mistake and producing invalid comments for macros - To let users specify
...
varargs asInfo.pointerTypes()
, have theParser
replace 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
Generator
not passing function objects even when annotatingFunctionPointer
parameters with@ByVal
or@ByRef
- Map
bool*
toboolean[]
tentatively inParser
sincesizeof(bool) == sizeof(jboolean)
on most platforms - Allow
Parser
to generate@Cast()
annotations and overloadedput()
methods in basic containers too - Move list of basic containers and types to
Info.cppTypes
of the "basic/containers" and "basic/types"InfoMap
entries, letting users change them at build time - Fix some
Parser
issues withtypedef
and forward declarations insideclass
definitions - Insure
Parser
maps 64-bit values in C++enum
tolong
variables (issue #48) - Fix
Generator
trying to cast improperly objects on return from@Virtual
functions - Make
Parser
takeconstexpr
,nullptr
, andnamespace
aliases 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
- Fix