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

FFI safety is now explicitly given #229

Merged
merged 9 commits into from Aug 28, 2023
Merged

Conversation

wavewave
Copy link
Owner

@wavewave wavewave commented Aug 28, 2023

User should now specify unsafe/safe/interruptible explicitly.
constructors and destructors are always unsafe (this should be taken granted. C++ library should not call Haskell back inside constructor/destructors). Accessor functions (getter/setter) are also unsafe.
On the other hand, calling an instance of std::function (which is hard-coded in FFICXX.Runtime.Function.TH) should be unconditionally safe.

@wavewave wavewave linked an issue Aug 28, 2023 that may be closed by this pull request
@wavewave wavewave merged commit 33e73b5 into master Aug 28, 2023
4 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.

safe/unsafe support
1 participant