@@ -382,23 +382,23 @@ void copyVector(SEXP s, SEXP t)
382
382
xcopyStringWithRecycle (s , t , 0 , ns , nt );
383
383
break ;
384
384
case LGLSXP :
385
- xcopyLogicalWithRecycle (LOGICAL (s ), LOGICAL (t ), 0 , ns , nt );
385
+ xcopyLogicalWithRecycle (LOGICAL (s ), LOGICAL_RO (t ), 0 , ns , nt );
386
386
break ;
387
387
case INTSXP :
388
- xcopyIntegerWithRecycle (INTEGER (s ), INTEGER (t ), 0 , ns , nt );
388
+ xcopyIntegerWithRecycle (INTEGER (s ), INTEGER_RO (t ), 0 , ns , nt );
389
389
break ;
390
390
case REALSXP :
391
- xcopyRealWithRecycle (REAL (s ), REAL (t ), 0 , ns , nt );
391
+ xcopyRealWithRecycle (REAL (s ), REAL_RO (t ), 0 , ns , nt );
392
392
break ;
393
393
case CPLXSXP :
394
- xcopyComplexWithRecycle (COMPLEX (s ), COMPLEX (t ), 0 , ns , nt );
394
+ xcopyComplexWithRecycle (COMPLEX (s ), COMPLEX_RO (t ), 0 , ns , nt );
395
395
break ;
396
396
case EXPRSXP :
397
397
case VECSXP :
398
398
xcopyVectorWithRecycle (s , t , 0 , ns , nt );
399
399
break ;
400
400
case RAWSXP :
401
- xcopyRawWithRecycle (RAW (s ), RAW (t ), 0 , ns , nt );
401
+ xcopyRawWithRecycle (RAW (s ), RAW_RO (t ), 0 , ns , nt );
402
402
break ;
403
403
default :
404
404
UNIMPLEMENTED_TYPE ("copyVector" , s );
@@ -486,7 +486,7 @@ void copyMatrix(SEXP s, SEXP t, Rboolean byrow)
486
486
487
487
#define COPY_WITH_RECYCLE (VALTYPE , TNAME ) \
488
488
attribute_hidden void \
489
- xcopy##TNAME##WithRecycle(VALTYPE *dst, VALTYPE *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc) { \
489
+ xcopy##TNAME##WithRecycle(VALTYPE *dst, const VALTYPE *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc) { \
490
490
\
491
491
if (nsrc >= n) { /* no recycle needed */ \
492
492
for (R_xlen_t i = 0 ; i < n ; i ++ ) \
0 commit comments