Skip to content

Commit 6bf94dd

Browse files
committed
Remove dead code from environment.hpp
1 parent 7b46c14 commit 6bf94dd

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

inst/include/cpp11/environment.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,11 @@
22

33
#include <string> // for string, basic_string
44

5-
#include "Rversion.h" // for R_VERSION, R_Version
65
#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_install, r_env_get...
76
#include "cpp11/as.hpp" // for as_sexp
87
#include "cpp11/protect.hpp" // for protect, protect::function, safe, unwin...
98
#include "cpp11/sexp.hpp" // for sexp
109

11-
#if R_VERSION >= R_Version(4, 0, 0)
12-
#define HAS_REMOVE_VAR_FROM_FRAME
13-
#endif
14-
15-
#ifndef HAS_REMOVE_VAR_FROM_FRAME
16-
#include "cpp11/function.hpp"
17-
#endif
18-
1910
namespace cpp11 {
2011

2112
class environment {
@@ -51,12 +42,7 @@ class environment {
5142

5243
void remove(SEXP name) {
5344
PROTECT(name);
54-
#ifdef HAS_REMOVE_VAR_FROM_FRAME
5545
R_removeVarFromFrame(name, env_);
56-
#else
57-
auto remove = package("base")["remove"];
58-
remove(name, "envir"_nm = env_);
59-
#endif
6046
UNPROTECT(1);
6147
}
6248

0 commit comments

Comments
 (0)