Skip to content

Commit a2f5cfc

Browse files
authored
Merge pull request #995 from RcppCore/feature/rcpp-no-modules
disable inclusion of modules code with RCPP_NO_MODULES
2 parents 92b6207 + 286a45f commit a2f5cfc

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2019-09-30 Kevin Ushey <[email protected]>
2+
3+
* inst/include/Rcpp.h: add RCPP_NO_MODULES
4+
* inst/include/Rcpp/api/meat/is.h: Idem
5+
* inst/include/Rcpp/api/meat/meat.h: Idem
6+
17
2019-09-28 Dirk Eddelbuettel <[email protected]>
28

39
* README.md: Add a stackoverflow tag to indicate where to ask questions,

inst/include/Rcpp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@
6363

6464
#include <Rcpp/Na_Proxy.h>
6565

66+
#ifndef RCPP_NO_MODULES
6667
#include <Rcpp/Module.h>
6768
#include <Rcpp/InternalFunction.h>
69+
#endif
6870

6971
#include <Rcpp/Nullable.h>
7072

inst/include/Rcpp/api/meat/is.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ namespace Rcpp {
148148
return TYPEOF(x) == REALSXP && Rf_inherits(x, "POSIXt");
149149
}
150150

151+
#ifndef RCPP_NO_MODULES
152+
151153
inline bool is_module_object_internal(SEXP obj, const char* clazz){
152154
Environment env(obj);
153155
SEXP sexp = env.get(".cppclass");
@@ -161,6 +163,8 @@ namespace Rcpp {
161163
return is_module_object_internal(x, typeid(CLASS).name());
162164
}
163165

166+
#endif
167+
164168

165169
} // namespace internal
166170
} // namespace Rcpp

inst/include/Rcpp/api/meat/meat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#include <Rcpp/api/meat/protection.h>
4343
#include <Rcpp/api/meat/wrap.h>
4444

45+
#ifndef RCPP_NO_MODULES
4546
#include <Rcpp/api/meat/module/Module.h>
47+
#endif
4648

4749
#endif

0 commit comments

Comments
 (0)