-
Notifications
You must be signed in to change notification settings - Fork 841
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 data and data finalizer to Ctx #95
Add data and data finalizer to Ctx #95
Conversation
lib/runtime/src/vm.rs
Outdated
} | ||
|
||
impl Ctx { | ||
pub unsafe fn new( | ||
local_backing: &mut LocalBacking, | ||
import_backing: &mut ImportBacking | ||
) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to reuse new_with_data
.
Self::new_with_data(local_backing, import_backing, ptr::null_mut(), empty_finalizer)
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syrusakbary I actually intended new_with_data to be temporary and I forgot to mention that (just trying to prove this concept). The new and new_with_data could be consolidated into new or we could keep new_with_data if you’d like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can keep both, but one function reusing the other function so code is not dup.
However I don't have a strong preference, so... your call! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fix repeated typo "funciton".
No description provided.