Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator still generates try-catch blocks for callbacks when NoException is present #484

Closed
junlarsen opened this issue May 29, 2021 · 2 comments
Labels

Comments

@junlarsen
Copy link
Member

junlarsen commented May 29, 2021

The Generator class will still produce JNI code with try-catch blocks for callback functions' _call function when the @NoException annotation is present.

Reproduction Steps

  1. Create a preset of a library that makes use of callback functions - I've tested with LLVM's C-style function pointers
  2. Add the @NoException annotation to the InfoMapper preset class
  3. Run the JavaCPP generator with the javacpp.deleteJniFiles property set to false
  4. View the generated JNI code for the callback types

Based on mailing list thread: https://groups.google.com/g/javacpp-project/c/zzGRu019BoA

@saudet saudet added the bug label May 30, 2021
saudet added a commit that referenced this issue Jun 1, 2021
…ads on callbacks (issue #486)

 * Pick up `@Allocator`, `@CriticalRegion`, `@NoException` in `Generator` from `@Properties(inherit=classes)` as well (issue #484)
@saudet
Copy link
Member

saudet commented Jun 1, 2021

Fixed in commit e5495a2. Thanks for reporting!

@junlarsen
Copy link
Member Author

Great, thank you. I've submitted bytedeco/javacpp-presets#1052 to update the LLVM and Clang presets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants