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

Use Local<> ubiquitously #40

Merged
merged 12 commits into from
Sep 5, 2018
Merged

Use Local<> ubiquitously #40

merged 12 commits into from
Sep 5, 2018

Conversation

jfirebaugh
Copy link
Contributor

Fixes #32 -- all high-level methods that produce a local reference now use Local<>. To enforce this Object<> is no longer publicly constructible/destructible, though you can still use Object<>&. Native methods should accept object arguments by reference, and you'll need to add a reference to auto& klass = Class<T>::Singleton(env).

Overall, this finally feels like the right solution to ownership compared to previous iterations (#30, PointerToValue).

Fixes #33 -- Object<Derived>& now converts to Object<Base>& via an inheritance relation. Needed this because Object<> is no longer publicly constructible, so you can't do the conversion manually.

@jfirebaugh jfirebaugh merged commit f10267c into master Sep 5, 2018
@jfirebaugh jfirebaugh deleted the seize-local branch September 5, 2018 21:51
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