Skip to content

prepare 4.0.0 and improve the generated C++ code - #13

Merged
sylvestre merged 6 commits into
mainfrom
prep2
Aug 7, 2026
Merged

prepare 4.0.0 and improve the generated C++ code#13
sylvestre merged 6 commits into
mainfrom
prep2

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

…aths

The retrieve helpers returned early (NULL result or pending secondary
exception) without releasing their local references. As giws embeds the
JVM, local references are only freed when the thread detaches, so they
accumulated. Also store the inline GetObjectClass(javaException) result
so it can be released on every path.
…urn-size-array

booleanDataGiws emitted 'int *lenRow;' followed by
'*lenRow = GetArrayLength(res)': a write through an uninitialized
pointer. Align it with the base class dataGiws which declares a local
'int lenRow' value when the size is not returned through an output
parameter.
The generated classes have a virtual method (getCurrentEnv), so
deleting an instance was flagged by -Wdelete-non-virtual-dtor and
deleting a derived wrapper through a base pointer was undefined
behavior.
Unused variables (example3, bug_disable_return, bug_no_param_int_array,
inherit/showcase), variable-length arrays in example2 (a Clang
extension in C++) and catching the polymorphic JniException by value in
example3. Everything now builds with -Wall -Werror with both gcc and
clang.
…Werror

After 'make examples' has generated the wrappers, compile every example
.cpp (generated and hand-written) with g++ -Wall -Werror
-fsyntax-only.
The 3.1.0 release was never published (the local tag will be replaced):
with the generated-code behavior changes accumulated since 3.0.1 (virtual
destructor, exception checks on non-static methods, ABI-visible fixes),
this is a major version.
@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@sylvestre
sylvestre merged commit 4123562 into main Aug 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant