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 data and data finalizer to Ctx #95

Merged
merged 2 commits into from
Jan 17, 2019

Conversation

bjfish
Copy link
Contributor

@bjfish bjfish commented Jan 17, 2019

No description provided.

@bjfish bjfish requested a review from lachlansneff January 17, 2019 16:01
}

impl Ctx {
pub unsafe fn new(
local_backing: &mut LocalBacking,
import_backing: &mut ImportBacking
) -> Self {
Copy link
Member

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?

Copy link
Contributor Author

@bjfish bjfish Jan 17, 2019

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.

Copy link
Member

@syrusakbary syrusakbary Jan 17, 2019

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! :)

Copy link
Contributor

@lachlansneff lachlansneff left a comment

Choose a reason for hiding this comment

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

LGTM!

@lachlansneff lachlansneff merged commit c74eed8 into feature/vm_refactor Jan 17, 2019
@syrusakbary syrusakbary deleted the feature/vm_refactor-host-data branch January 22, 2019 23:01
MarkMcCaskey pushed a commit that referenced this pull request Apr 14, 2020
nlewycky pushed a commit that referenced this pull request Aug 13, 2020
Fix repeated typo "funciton".
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.

3 participants