2
2
//
3
3
// api.cpp: Rcpp R/C++ interface class library -- Rcpp api
4
4
//
5
- // Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
5
+ // Copyright (C) 2012 - 2020 Dirk Eddelbuettel and Romain Francois
6
6
//
7
7
// This file is part of Rcpp.
8
8
//
@@ -53,7 +53,7 @@ namespace Rcpp {
53
53
}
54
54
55
55
// [[Rcpp::register]]
56
- unsigned long beginSuspendRNGSynchronization () {// #nocov start
56
+ unsigned long beginSuspendRNGSynchronization () { // #nocov start
57
57
++rngSynchronizationSuspended;
58
58
return rngSynchronizationSuspended;
59
59
}
@@ -62,7 +62,7 @@ namespace Rcpp {
62
62
unsigned long endSuspendRNGSynchronization () {
63
63
--rngSynchronizationSuspended;
64
64
return rngSynchronizationSuspended;
65
- } // #nocov end
65
+ } // #nocov end
66
66
67
67
// [[Rcpp::register]]
68
68
char * get_string_buffer () {
@@ -73,36 +73,36 @@ namespace Rcpp {
73
73
}
74
74
75
75
// [[Rcpp::register]]
76
- const char * type2name (SEXP x) { // #nocov start
76
+ const char * type2name (SEXP x) { // #nocov start
77
77
switch (TYPEOF (x)) {
78
- case NILSXP: return " NILSXP" ;
79
- case SYMSXP: return " SYMSXP" ;
80
- case RAWSXP: return " RAWSXP" ;
81
- case LISTSXP: return " LISTSXP" ;
82
- case CLOSXP: return " CLOSXP" ;
83
- case ENVSXP: return " ENVSXP" ;
84
- case PROMSXP: return " PROMSXP" ;
85
- case LANGSXP: return " LANGSXP" ;
86
- case SPECIALSXP: return " SPECIALSXP" ;
87
- case BUILTINSXP: return " BUILTINSXP" ;
88
- case CHARSXP: return " CHARSXP" ;
89
- case LGLSXP: return " LGLSXP" ;
90
- case INTSXP: return " INTSXP" ;
91
- case REALSXP: return " REALSXP" ;
92
- case CPLXSXP: return " CPLXSXP" ;
93
- case STRSXP: return " STRSXP" ;
94
- case DOTSXP: return " DOTSXP" ;
95
- case ANYSXP: return " ANYSXP" ;
96
- case VECSXP: return " VECSXP" ;
97
- case EXPRSXP: return " EXPRSXP" ;
98
- case BCODESXP: return " BCODESXP" ;
99
- case EXTPTRSXP: return " EXTPTRSXP" ;
100
- case WEAKREFSXP: return " WEAKREFSXP" ;
101
- case S4SXP: return " S4SXP" ;
78
+ case NILSXP: return " NILSXP" ;
79
+ case SYMSXP: return " SYMSXP" ;
80
+ case RAWSXP: return " RAWSXP" ;
81
+ case LISTSXP: return " LISTSXP" ;
82
+ case CLOSXP: return " CLOSXP" ;
83
+ case ENVSXP: return " ENVSXP" ;
84
+ case PROMSXP: return " PROMSXP" ;
85
+ case LANGSXP: return " LANGSXP" ;
86
+ case SPECIALSXP: return " SPECIALSXP" ;
87
+ case BUILTINSXP: return " BUILTINSXP" ;
88
+ case CHARSXP: return " CHARSXP" ;
89
+ case LGLSXP: return " LGLSXP" ;
90
+ case INTSXP: return " INTSXP" ;
91
+ case REALSXP: return " REALSXP" ;
92
+ case CPLXSXP: return " CPLXSXP" ;
93
+ case STRSXP: return " STRSXP" ;
94
+ case DOTSXP: return " DOTSXP" ;
95
+ case ANYSXP: return " ANYSXP" ;
96
+ case VECSXP: return " VECSXP" ;
97
+ case EXPRSXP: return " EXPRSXP" ;
98
+ case BCODESXP: return " BCODESXP" ;
99
+ case EXTPTRSXP: return " EXTPTRSXP" ;
100
+ case WEAKREFSXP: return " WEAKREFSXP" ;
101
+ case S4SXP: return " S4SXP" ;
102
102
default :
103
103
return " <unknown>" ;
104
104
}
105
- } // #nocov end
105
+ } // #nocov end
106
106
107
107
108
108
} // namespace Rcpp
@@ -127,21 +127,21 @@ std::string demangle(const std::string& name) {
127
127
}
128
128
129
129
// [[Rcpp::register]]
130
- const char * short_file_name (const char * file) { // #nocov start
130
+ const char * short_file_name (const char * file) { // #nocov start
131
131
std::string f (file);
132
132
size_t index = f.find (" /include/" );
133
133
if (index != std::string::npos) {
134
134
f = f.substr (index + 9 );
135
135
}
136
136
return f.c_str ();
137
- } // #nocov end
137
+ }
138
138
139
139
// [[Rcpp::internal]]
140
- SEXP as_character_externalptr (SEXP xp) { // #nocov start
140
+ SEXP as_character_externalptr (SEXP xp) {
141
141
char buffer[20 ];
142
142
snprintf (buffer, 20 , " %p" , (void *)EXTPTR_PTR (xp));
143
143
return Rcpp::wrap ((const char *)buffer);
144
- } // #nocov end
144
+ } // #nocov end
145
145
146
146
// [[Rcpp::internal]]
147
147
SEXP rcpp_capabilities () {
@@ -232,29 +232,29 @@ SEXP rcpp_capabilities() {
232
232
233
233
234
234
// [[Rcpp::internal]]
235
- SEXP rcpp_can_use_cxx0x () { // #nocov start
235
+ SEXP rcpp_can_use_cxx0x () { // #nocov start
236
236
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
237
237
return Rf_ScalarLogical (TRUE );
238
238
#else
239
239
return Rf_ScalarLogical (FALSE );
240
240
#endif
241
- } // #nocov end
241
+ }
242
242
243
243
244
244
// [[Rcpp::internal]]
245
- SEXP rcpp_can_use_cxx11 () { // #nocov start
245
+ SEXP rcpp_can_use_cxx11 () {
246
246
#if defined(RCPP_USING_CXX11)
247
247
return Rf_ScalarLogical (TRUE );
248
248
#else
249
249
return Rf_ScalarLogical (FALSE );
250
250
#endif
251
- } // #nocov end
251
+ }
252
252
253
253
254
254
// [[Rcpp::register]]
255
255
SEXP stack_trace (const char * file, int line) {
256
256
return R_NilValue;
257
- }
257
+ } // #nocov end
258
258
259
259
260
260
// // [ [ Rcpp::register ] ]
0 commit comments