Skip to content

Commit b417093

Browse files
committed
nocov markers for api.cpp
1 parent ebe97ab commit b417093

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/api.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ using namespace Rcpp;
4646
size_t last_close = buffer.find_last_of(')');
4747
if (last_open == std::string::npos ||
4848
last_close == std::string::npos) {
49-
return input;
49+
return input; // #nocov
5050
}
5151
std::string function_name = buffer.substr(last_open + 1, last_close - last_open - 1);
5252
// Strip the +0x14 (if it exists, which it does not in earlier versions of gcc)
@@ -91,7 +91,7 @@ namespace Rcpp {
9191
}
9292

9393
// [[Rcpp::register]]
94-
const char * type2name(SEXP x) {
94+
const char * type2name(SEXP x) { // #nocov start
9595
switch (TYPEOF(x)) {
9696
case NILSXP: return "NILSXP";
9797
case SYMSXP: return "SYMSXP";
@@ -120,7 +120,7 @@ namespace Rcpp {
120120
default:
121121
return "<unknown>";
122122
}
123-
}
123+
} // #nocov end
124124

125125

126126
} // namespace Rcpp
@@ -145,21 +145,21 @@ std::string demangle(const std::string& name) {
145145
}
146146

147147
// [[Rcpp::register]]
148-
const char* short_file_name(const char* file) {
148+
const char* short_file_name(const char* file) { // #nocov start
149149
std::string f(file);
150150
size_t index = f.find("/include/");
151151
if (index != std::string::npos) {
152152
f = f.substr(index + 9);
153153
}
154154
return f.c_str();
155-
}
155+
} // #nocov end
156156

157157
// [[Rcpp::internal]]
158-
SEXP as_character_externalptr(SEXP xp) {
158+
SEXP as_character_externalptr(SEXP xp) { // #nocov start
159159
char buffer[20];
160160
snprintf(buffer, 20, "%p", (void*)EXTPTR_PTR(xp));
161161
return Rcpp::wrap((const char*)buffer);
162-
}
162+
} // #nocov end
163163

164164
// [[Rcpp::internal]]
165165
SEXP rcpp_capabilities() {
@@ -250,23 +250,23 @@ SEXP rcpp_capabilities() {
250250

251251

252252
// [[Rcpp::internal]]
253-
SEXP rcpp_can_use_cxx0x() {
253+
SEXP rcpp_can_use_cxx0x() { // #nocov start
254254
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
255255
return Rf_ScalarLogical(TRUE);
256256
#else
257257
return Rf_ScalarLogical(FALSE);
258258
#endif
259-
}
259+
} // #nocov end
260260

261261

262262
// [[Rcpp::internal]]
263-
SEXP rcpp_can_use_cxx11() {
263+
SEXP rcpp_can_use_cxx11() { // #nocov start
264264
#if defined(RCPP_USING_CXX11)
265265
return Rf_ScalarLogical(TRUE);
266266
#else
267267
return Rf_ScalarLogical(FALSE);
268268
#endif
269-
}
269+
} // #nocov end
270270

271271

272272
// [[Rcpp::register]]

0 commit comments

Comments
 (0)