Skip to content

Commit f65a8cc

Browse files
committed
exchange alloccol with shallow
1 parent 249a471 commit f65a8cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/assign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ SEXP assign(SEXP dt, SEXP rows, SEXP cols, SEXP newcolnames, SEXP values)
461461
// perform re-overallocation since DT has too less columns #1831 #4100
462462
if (tl < oldncol+LENGTH(newcolnames)) {
463463
// use MAX to mitigate case where data is loaded from disk (readRDS()/load()) or constructed manually (e.g. using structure())
464-
dt = alloccol(dt, MAX(oldncol-tl, 0) + oldncol + length(newcolnames) + overAlloc, verbose);
464+
dt = shallow(dt,R_NilValue, MAX(oldncol-tl, 0) + oldncol + length(newcolnames) + overAlloc);
465465
tl = TRUELENGTH(dt);
466466
names = PROTECT(getAttrib(dt, R_NamesSymbol)); protecti++;
467467
}

0 commit comments

Comments
 (0)