Skip to content

Fix JNI code generation issues for Boolean return types, top-level functions, and visibility#15

Open
peacefulprogram wants to merge 1 commit into
dshatz:masterfrom
peacefulprogram:master
Open

Fix JNI code generation issues for Boolean return types, top-level functions, and visibility#15
peacefulprogram wants to merge 1 commit into
dshatz:masterfrom
peacefulprogram:master

Conversation

@peacefulprogram

Copy link
Copy Markdown
  1. Fix syntax error in generated JNI native functions when an @JniCall function returns Boolean.
image
  1. Fix incorrect JNI native function names for top-level functions defined in lowercase-named files.
    The first character of the generated Java class name is always uppercase.
image
  1. Make generated JVM external functions private, and preserve the visibility of generated JVM actual declarations.

…l function returns Boolean.

2. Fix incorrect JNI native function names for top-level functions defined in lowercase-named files.
3. Make generated JVM external functions private, and preserve the visibility of generated JVM actual declarations.
@dshatz

dshatz commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Hi thank you for the contribution!
The code looks fine!
Unfortunately I may not be able to merge this because of the big refactoring in #14. I will try to merge that this week we will see what can be done.

That branch also fixes some issues with top level functions and boolean conversion.
Maybe you can change the merge target to that branch?

@dshatz

dshatz commented Jun 28, 2026

Copy link
Copy Markdown
Owner

The first character of the generated Java class name is always uppercase.

I believe that's the default behavior when creating top level functions inside a file with non capitalized name.
demo.kt -> DemoKt

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.

2 participants