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

disable inclusion of modules code with RCPP_NO_MODULES #995

Merged
merged 1 commit into from Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2019-09-30 Kevin Ushey <kevinushey@gmail.com>

* inst/include/Rcpp.h: add RCPP_NO_MODULES
* inst/include/Rcpp/api/meat/is.h: Idem
* inst/include/Rcpp/api/meat/meat.h: Idem

2019-09-28 Dirk Eddelbuettel <edd@debian.org>

* README.md: Add a stackoverflow tag to indicate where to ask questions,
Expand Down
2 changes: 2 additions & 0 deletions inst/include/Rcpp.h
Expand Up @@ -63,8 +63,10 @@

#include <Rcpp/Na_Proxy.h>

#ifndef RCPP_NO_MODULES
#include <Rcpp/Module.h>
#include <Rcpp/InternalFunction.h>
#endif

#include <Rcpp/Nullable.h>

Expand Down
4 changes: 4 additions & 0 deletions inst/include/Rcpp/api/meat/is.h
Expand Up @@ -148,6 +148,8 @@ namespace Rcpp {
return TYPEOF(x) == REALSXP && Rf_inherits(x, "POSIXt");
}

#ifndef RCPP_NO_MODULES

inline bool is_module_object_internal(SEXP obj, const char* clazz){
Environment env(obj);
SEXP sexp = env.get(".cppclass");
Expand All @@ -161,6 +163,8 @@ namespace Rcpp {
return is_module_object_internal(x, typeid(CLASS).name());
}

#endif


} // namespace internal
} // namespace Rcpp
Expand Down
2 changes: 2 additions & 0 deletions inst/include/Rcpp/api/meat/meat.h
Expand Up @@ -42,6 +42,8 @@
#include <Rcpp/api/meat/protection.h>
#include <Rcpp/api/meat/wrap.h>

#ifndef RCPP_NO_MODULES
#include <Rcpp/api/meat/module/Module.h>
#endif

#endif