You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal_error(__func__, "selfrefnames is ok but tl names [%lld] != tl [%d]", (long long)TRUELENGTH(names), oldtncol); // # nocov
528
526
if (!selfrefok(dt, verbose)) // #6410 setDT(dt) and subsequent attr<- can lead to invalid selfref
529
527
error(_("It appears that at some earlier point, attributes of this data.table have been reassigned. Please use setattr(DT, name, value) rather than attr(DT, name) <- value. If that doesn't apply to you, please report your case to the data.table issue tracker."));
SEXPthiscol=typeChanged ? allocVector(typeSxp[type[i]], allocNrow) : growVector(col, allocNrow); // no need to PROTECT, passed immediately to SET_VECTOR_ELT, see R-exts 5.9.1
516
-
516
+
SEXPthiscol=typeChanged ? R_allocResizableVector(typeSxp[type[i]], allocNrow) : growVector(col, allocNrow); // no need to PROTECT, passed immediately to SET_VECTOR_ELT, see R-exts 5.9.1
517
+
517
518
SET_VECTOR_ELT(DT, resi, thiscol);
518
519
if (type[i] ==CT_INT64) {
519
520
SEXPtt=PROTECT(ScalarString(char_integer64));
@@ -534,7 +535,6 @@ size_t allocateDT(int8_t *typeArg, int8_t *sizeArg, int ncolArg, int ndrop, size
534
535
535
536
setAttrib(thiscol, sym_tzone, ScalarString(char_UTC)); // see news for v1.13.0
SET_TRUELENGTH(x, LENGTH(x)); // important because gc() uses TRUELENGTH to keep counts
82
-
} else {
83
-
// # nocov start ## does not seem to be reported to codecov most likely due to running in a fork, I manually debugged that it is being called when running froll.Rraw
84
-
for (inti=0; i<LENGTH(x); i++) {
85
-
//Rprintf("%d",3); // manual code coverage to confirm it is reached when marking nocov
SEXPans=PROTECT(allocVector(VECSXP, LENGTH(cols)+overAlloc)); nprotect++; // doing alloc.col directly here; eventually alloc.col can be deprecated.
300
+
SEXPans=PROTECT(R_allocResizableVector(VECSXP, LENGTH(cols)+overAlloc)); nprotect++; // doing alloc.col directly here; eventually alloc.col can be deprecated.
301
301
302
302
// user-defined and superclass attributes get copied as from v1.12.0
303
303
copyMostAttrib(x, ans);
304
304
// most means all except R_NamesSymbol, R_DimSymbol and R_DimNamesSymbol
305
305
// includes row.names (oddly, given other dims aren't) and "sorted" dealt with below
306
306
// class is also copied here which retains superclass name in class vector as has been the case for many years; e.g. tests 1228.* for #64
0 commit comments