@@ -28,19 +28,19 @@ namespace Rcpp{
2828
2929
3030 template <typename T>
31- std::wstring as_string_elt__impl ( SEXP x, R_len_t i, Rcpp::traits::true_type ){
31+ std::wstring as_string_elt__impl ( SEXP x, R_xlen_t i, Rcpp::traits::true_type ){
3232 const char * y = char_get_string_elt ( x, i ) ;
3333 return std::wstring (y, y+strlen (y) ) ;
3434 }
3535
3636 template <typename T>
37- std::string as_string_elt__impl ( SEXP x, R_len_t i, Rcpp::traits::false_type ){
37+ std::string as_string_elt__impl ( SEXP x, R_xlen_t i, Rcpp::traits::false_type ){
3838 return char_get_string_elt ( x, i ) ;
3939 }
4040
4141 template <typename T>
4242 const std::basic_string< typename Rcpp::traits::char_type<T>::type >
43- as_string_elt ( SEXP x, R_len_t i ){
43+ as_string_elt ( SEXP x, R_xlen_t i ){
4444 return as_string_elt__impl<T>( x, i, typename Rcpp::traits::is_wide_string<T>::type () ) ;
4545 }
4646
@@ -52,7 +52,7 @@ namespace Rcpp{
5252 typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
5353 Shield<SEXP> y ( ::Rcpp::r_cast<RTYPE>(x) ) ;
5454 STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
55- std::copy ( start, start + ::Rf_length (y), first ) ;
55+ std::copy ( start, start + ::Rf_xlength (y), first ) ;
5656 }
5757
5858 template <typename InputIterator, typename value_type>
@@ -61,7 +61,7 @@ namespace Rcpp{
6161 typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
6262 Shield<SEXP> y ( ::Rcpp::r_cast<RTYPE>(x) ) ;
6363 STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
64- std::transform ( start, start + ::Rf_length (y) , first, caster<STORAGE,value_type> ) ;
64+ std::transform ( start, start + ::Rf_xlength (y) , first, caster<STORAGE,value_type> ) ;
6565 }
6666
6767 // implemented in meat
@@ -80,8 +80,8 @@ namespace Rcpp{
8080 template <typename InputIterator, typename value_type>
8181 void export_range__dispatch ( SEXP x, InputIterator first, ::Rcpp::traits::r_type_string_tag ) {
8282 if ( ! ::Rf_isString ( x) ) throw ::Rcpp::not_compatible ( " expecting a string vector" ) ;
83- R_len_t n = ::Rf_length (x) ;
84- for ( R_len_t i=0 ; i<n; i++, ++first ){
83+ R_xlen_t n = ::Rf_xlength (x) ;
84+ for ( R_xlen_t i=0 ; i<n; i++, ++first ){
8585 *first = as_string_elt<typename std::iterator_traits<InputIterator>::value_type> ( x, i ) ;
8686 }
8787 }
@@ -104,8 +104,8 @@ namespace Rcpp{
104104 typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
105105 Shield<SEXP> y ( ::Rcpp::r_cast<RTYPE>(x) ) ;
106106 STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
107- R_len_t size = ::Rf_length (y) ;
108- for ( R_len_t i=0 ; i<size; i++){
107+ R_xlen_t size = ::Rf_xlength (y) ;
108+ for ( R_xlen_t i=0 ; i<size; i++){
109109 res[i] = start[i] ;
110110 }
111111 }
@@ -116,8 +116,8 @@ namespace Rcpp{
116116 typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
117117 Shield<SEXP> y ( ::Rcpp::r_cast<RTYPE>(x) );
118118 STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
119- R_len_t size = ::Rf_length (y) ;
120- for ( R_len_t i=0 ; i<size; i++){
119+ R_xlen_t size = ::Rf_xlength (y) ;
120+ for ( R_xlen_t i=0 ; i<size; i++){
121121 res[i] = caster<STORAGE,value_type>(start[i]) ;
122122 }
123123 }
@@ -134,8 +134,8 @@ namespace Rcpp{
134134 template <typename T, typename value_type>
135135 void export_indexing__dispatch ( SEXP x, T& res, ::Rcpp::traits::r_type_string_tag ) {
136136 if ( ! ::Rf_isString ( x) ) throw Rcpp::not_compatible ( " expecting a string vector" ) ;
137- R_len_t n = ::Rf_length (x) ;
138- for ( R_len_t i=0 ; i<n; i++ ){
137+ R_xlen_t n = ::Rf_xlength (x) ;
138+ for ( R_xlen_t i=0 ; i<n; i++ ){
139139 res[i] = as_string_elt< value_type >( x, i) ;
140140 }
141141 }
0 commit comments