Skip to content

Commit da2ad34

Browse files
committed
more nocov
1 parent 6e9d791 commit da2ad34

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
2020-01-01 Dirk Eddelbuettel <[email protected]>
22

3-
* inst/include/Rcpp/module/Module.h: A few more #nocov tags
3+
* inst/include/Rcpp/module/Module.h: A few more #nocov tags
4+
* inst/include/Rcpp/XPtr.h: Idem
45

56
2019-12-31 Dirk Eddelbuettel <[email protected]>
67

inst/include/Rcpp/XPtr.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
21
//
32
// XPtr.h: Rcpp R/C++ interface class library -- smart external pointers
43
//
5-
// Copyright (C) 2009 - 2017 Dirk Eddelbuettel and Romain Francois
4+
// Copyright (C) 2009 - 2020 Dirk Eddelbuettel and Romain Francois
65
//
76
// This file is part of Rcpp.
87
//
@@ -27,7 +26,7 @@
2726
namespace Rcpp {
2827

2928
template <typename T>
30-
void standard_delete_finalizer(T* obj) {
29+
void standard_delete_finalizer(T* obj) { // #nocov start
3130
delete obj;
3231
}
3332

@@ -46,7 +45,7 @@ void finalizer_wrapper(SEXP p) {
4645
R_ClearExternalPtr(p);
4746

4847
Finalizer(ptr);
49-
}
48+
} // #nocov end
5049

5150
template <
5251
typename T,
@@ -102,7 +101,7 @@ class XPtr :
102101
RCPP_DEBUG_2("XPtr(T* p = <%p>, bool set_delete_finalizer = %s, SEXP tag = R_NilValue, SEXP prot = R_NilValue)", p, (set_delete_finalizer ? "true" : "false"))
103102
Storage::set__(R_MakeExternalPtr((void*)p , tag, prot));
104103
if (set_delete_finalizer) {
105-
setDeleteFinalizer();
104+
setDeleteFinalizer(); // #nocov
106105
}
107106
}
108107

@@ -142,7 +141,7 @@ class XPtr :
142141
inline T* checked_get() const {
143142
T* ptr = get();
144143
if (ptr == NULL)
145-
throw ::Rcpp::exception("external pointer is not valid");
144+
throw ::Rcpp::exception("external pointer is not valid"); // #nocov
146145
return ptr;
147146
}
148147

@@ -162,10 +161,10 @@ class XPtr :
162161
return checked_get();
163162
}
164163

165-
void setDeleteFinalizer() {
164+
void setDeleteFinalizer() { // #nocov start
166165
R_RegisterCFinalizerEx(Storage::get__(), finalizer_wrapper<T,Finalizer>,
167166
(Rboolean) finalizeOnExit);
168-
}
167+
} // #nocov end
169168

170169
/**
171170
* Release the external pointer (if any) immediately. This will cause
@@ -197,8 +196,8 @@ class XPtr :
197196
private:
198197
inline void checked_set(SEXP x) {
199198
if (TYPEOF(x) != EXTPTRSXP) {
200-
const char* fmt = "Expecting an external pointer: [type=%s].";
201-
throw ::Rcpp::not_compatible(fmt, Rf_type2char(TYPEOF(x)));
199+
const char* fmt = "Expecting an external pointer: [type=%s]."; // #nocov
200+
throw ::Rcpp::not_compatible(fmt, Rf_type2char(TYPEOF(x))); // #nocov
202201
}
203202
Storage::set__(x);
204203
}

inst/include/Rcpp/module/Module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Module.h: Rcpp R/C++ interface class library -- Rcpp modules
33
//
4-
// Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
4+
// Copyright (C) 2012 - 2020 Dirk Eddelbuettel and Romain Francois
55
//
66
// This file is part of Rcpp.
77
//

0 commit comments

Comments
 (0)