Skip to content

Commit 14c1148

Browse files
committed
adjust to previous code
1 parent 5caf9cc commit 14c1148

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

R/frollapply.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ frollapply = function(X, N, FUN, ..., by.column=TRUE, fill=NA, align=c("right","
297297
tight = function(i, dest, src, n) FUN(.Call(CmemcpyDT, dest, src, i, n), ...)
298298
}
299299
} else {
300-
cpy = function(x) .Call(CcopyAsGrowable, x, by.column)
300+
cpy = function(x) .Call(CcopyAsGrowable, x)
301301
ansMask = function(len, n) {
302302
mask = seq_len(len) >= n
303303
mask[is.na(mask)] = FALSE ## test 6010.206

src/data.table.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ SEXP memcpyVector(SEXP dest, SEXP src, SEXP offset, SEXP size);
298298
SEXP memcpyDT(SEXP dest, SEXP src, SEXP offset, SEXP size);
299299
SEXP memcpyVectoradaptive(SEXP dest, SEXP src, SEXP offset, SEXP size);
300300
SEXP memcpyDTadaptive(SEXP dest, SEXP src, SEXP offset, SEXP size);
301-
SEXP copyAsGrowable(SEXP x, SEXP by_column);
301+
SEXP copyAsGrowable(SEXP x);
302302

303303
// nafill.c
304304
void nafillDouble(double *x, uint_fast64_t nx, unsigned int type, double fill, bool nan_is_na, ans_t *ans, bool verbose);

src/frollapply.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,15 @@ SEXP memcpyDTadaptive(SEXP dest, SEXP src, SEXP offset, SEXP size) {
7575
// # nocov end
7676

7777
// needed in adaptive=TRUE
78-
SEXP copyAsGrowable(SEXP x, SEXP by_column) {
79-
if (asLogical(by_column))
78+
SEXP copyAsGrowable(SEXP x) {
79+
if (!isNewList(x))
8080
return R_duplicateAsResizable(x);
8181

8282
SEXP ret = PROTECT(shallow_duplicate(x));
8383
R_xlen_t n = xlength(ret);
8484
for (R_xlen_t i = 0; i < n; ++i)
8585
SET_VECTOR_ELT(ret, i, R_duplicateAsResizable(VECTOR_ELT(ret, i)));
86+
8687
UNPROTECT(1);
8788
return ret;
8889
}

0 commit comments

Comments
 (0)