File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,11 @@ namespace Rcpp{
99
99
if ( TYPEOF (fun) != CLOSXP ) {
100
100
throw not_a_closure (Rf_type2char (TYPEOF (fun)));
101
101
}
102
- return CLOENV (fun) ;
102
+ #if (defined(R_VERSION) && R_VERSION >= R_Version(4,5,0))
103
+ return R_ClosureEnv (fun);
104
+ #else
105
+ return CLOENV (fun);
106
+ #endif
103
107
}
104
108
105
109
/* *
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ namespace Rcpp{
43
43
Storage::set__ ( x ) ;
44
44
break ; /* nothing to do */
45
45
case CHARSXP: {
46
- #if R_VERSION >= R_Version(3,2,0)
46
+ #if R_VERSION >= R_Version(3,2,0)
47
47
SEXP charSym = Rf_installChar (x); // R 3.2.0 or later have Rf_installChar
48
48
#else
49
49
SEXP charSym = Rf_install (CHAR (x)); // cannot be gc()'ed once in symbol table
@@ -53,7 +53,7 @@ namespace Rcpp{
53
53
}
54
54
case STRSXP: {
55
55
/* FIXME: check that there is at least one element */
56
- #if R_VERSION >= R_Version(3,2,0)
56
+ #if R_VERSION >= R_Version(3,2,0)
57
57
SEXP charSym = Rf_installChar (STRING_ELT (x, 0 )); // R 3.2.0 or later have Rf_installChar
58
58
#else
59
59
SEXP charSym = Rf_install ( CHAR (STRING_ELT (x, 0 )) ); // cannot be gc()'ed once in symbol table
You can’t perform that action at this time.
0 commit comments