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{
9999 if ( TYPEOF (fun) != CLOSXP ) {
100100 throw not_a_closure (Rf_type2char (TYPEOF (fun)));
101101 }
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
103107 }
104108
105109 /* *
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ namespace Rcpp{
4343 Storage::set__ ( x ) ;
4444 break ; /* nothing to do */
4545 case CHARSXP: {
46- #if R_VERSION >= R_Version(3,2,0)
46+ #if R_VERSION >= R_Version(3,2,0)
4747 SEXP charSym = Rf_installChar (x); // R 3.2.0 or later have Rf_installChar
4848 #else
4949 SEXP charSym = Rf_install (CHAR (x)); // cannot be gc()'ed once in symbol table
@@ -53,7 +53,7 @@ namespace Rcpp{
5353 }
5454 case STRSXP: {
5555 /* 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)
5757 SEXP charSym = Rf_installChar (STRING_ELT (x, 0 )); // R 3.2.0 or later have Rf_installChar
5858 #else
5959 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