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

Add support for NIF unload and upgrade #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

vihu
Copy link
Owner

@vihu vihu commented Jan 18, 2022

This builds is a newer version of rusterlium#281 as 281 is now very old and has conflicts.

Furthermore, this makes each of load, unload and upgrade and optional parameter to the init! macro, primarily because it's possible for a stub nif to exist without specifying any of those.

One of the primary reasons why unload and upgrade are required is because newer versions of OTP and EQC (Quviq's quickcheck) insist on having the NIF support (at least in stub form) that there is an unload and upgrade mechanism provided by the library otherwise the quickcheck wouldn't run.

@vihu vihu changed the title [DNM] unload and upgrade Add support for NIF unload and upgrade Jan 18, 2022
@vihu vihu marked this pull request as ready for review January 19, 2022 00:22
Comment on lines +96 to +97
_priv_data: *mut *mut rustler::codegen_runtime::c_void,
_old_priv_data: *mut *mut rustler::codegen_runtime::c_void,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't make a whole lot of sense to not pass priv data into the provided upgrade function. But... load doesn't either so maybe it's fine?

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