Skip to content

Commit 3bd9606

Browse files
committed
Merge pull request #333 from RcppCore/bugfix/r_xlen_t-windows
bug fix for windows regression
2 parents d559fb8 + a726da7 commit 3bd9606

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

inst/unitTests/cpp/ListOf.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,14 @@ NVList test_binary_ops(NVList x) {
8383
);
8484
}
8585

86-
// [[Rcpp::export]]
87-
R_xlen_t test_sub_calls(NVList x) {
88-
R_xlen_t sz = x[0].size() + x[1].size() + x[2].size();
86+
#if defined(_WIN32)
87+
typedef int retval;
88+
#else
89+
typedef R_xlen_t retval;
90+
#endif
91+
// [[Rcpp::export]]
92+
retval test_sub_calls(NVList x) {
93+
retval sz = x[0].size() + x[1].size() + x[2].size();
8994
return sz;
9095
}
9196

0 commit comments

Comments
 (0)