Skip to content

Commit 5ea44f1

Browse files
authored
Merge pull request #1054 from RcppCore/bugfix/rf_list2
Fix Rcpp_list2 issue (closes #1053)
2 parents 20e462f + c059c5f commit 5ea44f1

File tree

5 files changed

+49
-14
lines changed

5 files changed

+49
-14
lines changed

ChangeLog

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
2020-03-18 Dirk Eddelbuettel <[email protected]>
2+
3+
* DESCRIPTION (Version, Date): Roll minor version
4+
* inst/include/Rcpp/config.h: Idem
5+
6+
* inst/include/Rcpp/lang.h: Define Rcpp_list{2,3,4,5} in the Rcpp
7+
namespace
8+
9+
* DESCRIPTION: Remove versioned depends on R (>= 3.0.0) from 2013
10+
111
2020-03-17 Davis Vaughan <[email protected]>
212

313
* inst/include/Rcpp/lang.h: Inline Rcpp_list6() to support R 3.3.
414

515
2020-03-17 Dirk Eddelbuettel <[email protected]>
616

7-
* DESCRIPTION (Version, Date): Roll minor version
17+
* DESCRIPTION (Version, Date): Roll minor version (twice)
818
* inst/include/Rcpp/config.h: Idem
919

1020
* inst/NEWS.Rd: Updated

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 1.0.4.2
4-
Date: 2020-03-17
3+
Version: 1.0.4.3
4+
Date: 2020-03-18
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou,
66
Nathan Russell, Douglas Bates and John Chambers
77
Maintainer: Dirk Eddelbuettel <[email protected]>
@@ -14,7 +14,6 @@ Description: The 'Rcpp' package provides R functions as well as C++ classes whic
1414
Francois (2011, <doi:10.18637/jss.v040.i08>), the book by Eddelbuettel (2013,
1515
<doi:10.1007/978-1-4614-6868-4>) and the paper by Eddelbuettel and Balamuta (2018,
1616
<doi:10.1080/00031305.2017.1375990>); see 'citation("Rcpp")' for details.
17-
Depends: R (>= 3.0.0)
1817
Imports: methods, utils
1918
Suggests: tinytest, inline, rbenchmark, pkgKitten (>= 0.1.2)
2019
URL: http://www.rcpp.org, http://dirk.eddelbuettel.com/code/rcpp.html, https://github.com/RcppCore/Rcpp

inst/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
proper include behavior (Kevin in \ghpr{1047} fixing \ghit{1046}).
1212
\item A missing \code{Rcpp_list6} definition was added to support
1313
R 3.3.* builds (Davis Vaughan in \ghpr{1049} fixing \ghit{1048}).
14+
\item Missing \code{Rcpp_list{2,3,4,5} definition were added to
15+
the Rcpp namespace (Dirk fixing \ghit{1053}).
1416
}
1517
}
1618
}

inst/include/Rcpp/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define RCPP_VERSION_STRING "1.0.4"
3131

3232
// the current source snapshot
33-
#define RCPP_DEV_VERSION RcppDevVersion(1,0,4,2)
34-
#define RCPP_DEV_VERSION_STRING "1.0.4.2"
33+
#define RCPP_DEV_VERSION RcppDevVersion(1,0,4,3)
34+
#define RCPP_DEV_VERSION_STRING "1.0.4.3"
3535

3636
#endif

inst/include/Rcpp/lang.h

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2-
//
1+
32
// lang.h: Rcpp R/C++ interface class library -- extra lang_* functions
43
//
5-
// Copyright (C) 2011 - 2013 Dirk Eddelbuettel and Romain Francois
4+
// Copyright (C) 2011 - 2020 Dirk Eddelbuettel and Romain Francois
65
//
76
// This file is part of Rcpp.
87
//
@@ -24,20 +23,46 @@
2423

2524
#define Rcpp_list1 Rf_list1
2625
#define Rcpp_lang1 Rf_lang1
27-
#define Rcpp_list2 Rf_list2
2826
#define Rcpp_lang2 Rf_lang2
29-
#define Rcpp_list3 Rf_list3
3027
#define Rcpp_lang3 Rf_lang3
31-
#define Rcpp_list4 Rf_list4
3228
#define Rcpp_lang4 Rf_lang4
33-
#define Rcpp_list5 Rf_list5
3429
#define Rcpp_lang5 Rf_lang5
3530
#define Rcpp_lang6 Rf_lang6
3631

3732
#define Rcpp_lcons Rf_lcons
3833

3934
namespace Rcpp {
4035

36+
inline SEXP Rcpp_list2(SEXP x0, SEXP x1) {
37+
PROTECT(x0);
38+
x0 = Rf_cons(x0, Rcpp_list1(x1));
39+
UNPROTECT(1);
40+
return x0;
41+
}
42+
43+
inline SEXP Rcpp_list3(SEXP x0, SEXP x1, SEXP x2) {
44+
PROTECT(x0);
45+
x0 = Rf_cons(x0, Rcpp_list2(x1, x2));
46+
UNPROTECT(1);
47+
return x0;
48+
}
49+
50+
inline SEXP Rcpp_list4(SEXP x0, SEXP x1, SEXP x2, SEXP x3) {
51+
PROTECT(x0);
52+
x0 = Rf_cons(x0, Rcpp_list3(x1, x2, x3));
53+
UNPROTECT(1);
54+
return x0;
55+
}
56+
57+
inline SEXP Rcpp_list5(SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4) {
58+
PROTECT(x0);
59+
x0 = Rf_cons(x0, Rcpp_list4(x1, x2, x3, x4));
60+
UNPROTECT(1);
61+
return x0;
62+
}
63+
64+
65+
4166
// `Rf_lang6()` is available on R 3.3, but `Rf_list6()` is not
4267
inline SEXP Rcpp_list6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 )
4368
{
@@ -330,4 +355,3 @@ inline SEXP Rcpp_lang20( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S
330355
}
331356

332357
#endif
333-

0 commit comments

Comments
 (0)