Skip to content

Commit

Permalink
avoid STDVEC_DATAPTR
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Jun 4, 2024
1 parent 51d4c02 commit 10f95b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shikokuchuo.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ SEXP _tbl(SEXP x, SEXP type) {
for (R_xlen_t j = 1; j <= xwid; j++) {
SEXP vec = Rf_allocVector(REALSXP, xlen);
SET_VECTOR_ELT(tbl, j, vec);
memcpy(STDVEC_DATAPTR(vec), src, vecsize);
memcpy(DATAPTR(vec), src, vecsize);
src += xlen;
}

Expand Down Expand Up @@ -284,7 +284,7 @@ SEXP _df(SEXP x) {
for (R_xlen_t j = 1; j <= xwid; j++) {
SEXP vec = Rf_allocVector(REALSXP, xlen);
SET_VECTOR_ELT(df, j, vec);
memcpy(STDVEC_DATAPTR(vec), src, vecsize);
memcpy(DATAPTR(vec), src, vecsize);
src += xlen;
}

Expand Down

0 comments on commit 10f95b3

Please sign in to comment.