Skip to content

Commit cfdb196

Browse files
committed
Inline Rcpp_list6() for compatibility with R 3.3
1 parent bf28802 commit cfdb196

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

inst/include/Rcpp/lang.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,25 @@
3232
#define Rcpp_lang4 Rf_lang4
3333
#define Rcpp_list5 Rf_list5
3434
#define Rcpp_lang5 Rf_lang5
35-
#define Rcpp_list6 Rf_list6
3635
#define Rcpp_lang6 Rf_lang6
3736

3837
#define Rcpp_lcons Rf_lcons
3938

4039
namespace Rcpp {
4140

41+
// `Rf_lang6()` is available on R 3.3, but `Rf_list6()` is not
42+
inline SEXP Rcpp_list6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 )
43+
{
44+
PROTECT(x0);
45+
x0 = Rf_cons(x0, Rcpp_list5(x1, x2, x3, x4, x5));
46+
UNPROTECT(1);
47+
return x0;
48+
}
49+
50+
51+
52+
53+
4254
inline SEXP Rcpp_list7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6 )
4355
{
4456
PROTECT(x0);

0 commit comments

Comments
 (0)