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

Update Module.h #737

Merged
merged 1 commit into from
Aug 4, 2017
Merged

Update Module.h #737

merged 1 commit into from
Aug 4, 2017

Conversation

assassin5615
Copy link
Contributor

@assassin5615 assassin5615 commented Aug 4, 2017

Fixed compilation error in LOAD_RCPP_MODULE

Fixed compilation error in LOAD_RCCP_MODULE
@eddelbuettel
Copy link
Member

Nice. Can we possibly complement it with a test case? Do you have a usage example?

@assassin5615
Copy link
Contributor Author

actually, I am also wondering how this macro is intended to be used. currently, I am only using this macro as a reference for how to load a Module.

I am working on something that runs R inside c++, to use this Macro directly, it needs to be changed to something like LOAD_RCPP_MODULE(NAME, SEXP) ..... SEXP=Rf_eval(...), then I can write following code
RInside R(argc, argv); LOAD_RCPP_MODULE(Test, R['Test'])

anyone knows why this macro was added in the first place?

@eddelbuettel eddelbuettel merged commit bee6b1e into RcppCore:master Aug 4, 2017
@eddelbuettel
Copy link
Member

How Modules get loaded changed once (basically from the R side). This macro may or may not predate that change, I am not sure at the moment. I always trigger the load from the R side.

@eddelbuettel
Copy link
Member

What name+email should I use for you in the ChangeLog?

@assassin5615
Copy link
Contributor Author

you can use Lei Yu leiyu_1981@qq.com.

I am working on something that needs to load module from the c++ side. I have to assign the value returned by Rf_eval in the macro to something like R['my_own_module'] to use it. if it can be used directly(no need to assign the return value to something), the macro is useful when it comes to loading module in c++.

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.

None yet

2 participants