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

Adapt pointer to closure #347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idegtiarenko
Copy link

When implementing an integration with the libfuse I noticed that the readdir callback supplies the user with a fuse_fill_dir_t that is a pointer to a function that supposed to be called for every child item in the directory.

I have not found a way to automatically nor programmatically convert that pointer to a closure so that it could be called within java.
I believe others implementations might have a similar issue that required a split package to fix.

This change adds a similar implementation to the ClosureManager/NativeClosureManager so that the pointer could be adapted to the interface callable from java.

I am new to the jnr-ffi lib. Please let me know if I miss anything or if it is a right way to resolve this issue.

Thanks!

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