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 public R APIs for new_env #785

Merged
merged 3 commits into from
Dec 6, 2017
Merged

Conversation

kevinushey
Copy link
Contributor

Closes #771. We use Rcpp::Function + new.env() instead of an (unfortunately) unexported R API for constructing environments.

@@ -44,6 +44,15 @@ Environment_Impl<StoragePolicy>::Environment_Impl( int pos ){
Storage::set__(env) ;
}

inline Environment new_env(int size = 29) {
Function newEnv("new.env");
Copy link
Member

Choose a reason for hiding this comment

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

Should we be fancy and memoise / keep a once init'ed Function ? Probably not worth it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could do that (just make it a static object so it's only initialized once on first call). Certainly doesn't hurt but agree we don't gain much.

@eddelbuettel
Copy link
Member

I think I'll just squash merge this later and then run a new rev dep. Unless you want to rebase...

@kevinushey
Copy link
Contributor Author

Squash merge sounds good to me.

@eddelbuettel eddelbuettel merged commit 921e7d6 into master Dec 6, 2017
@eddelbuettel eddelbuettel deleted the bugfix/new-env-public-api branch December 21, 2017 11:54
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