Skip to content

Commit 248bab7

Browse files
committed
reset truelength definition
1 parent 2b5444b commit 248bab7

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

src/assign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ SEXP shallowwrapper(SEXP dt, SEXP cols) {
320320
}
321321

322322
SEXP truelength(SEXP x) {
323-
return ScalarInteger(is_growable(x) ? growable_capacity(x) : 0);
323+
return ScalarInteger(isNull(x) ? 0 : growable_capacity(x));
324324
}
325325

326326
SEXP selfrefokwrapper(SEXP x, SEXP verbose) {

src/freadR.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ bool userOverride(int8_t *type, lenOff *colNames, const char *anchor, const int
265265
colNamesSxp = R_NilValue;
266266
SET_VECTOR_ELT(RCHK, 1, colNamesSxp=growable_allocate(STRSXP, ncol, ncol));
267267
for (int i=0; i<ncol; i++) {
268-
SEXP elem;
269268
if (colNames==NULL || colNames[i].len<=0) {
270269
char buff[12];
271270
snprintf(buff, sizeof(buff), "V%d", i + 1); // # notranslate

src/wrappers.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,3 @@ SEXP warn_matrix_column_r(SEXP i) {
132132
warn_matrix_column(INTEGER(i)[0]);
133133
return R_NilValue;
134134
}
135-
136-
SEXP setgrowable(SEXP x) {
137-
for (R_xlen_t i = 0; i < xlength(x); ++i) {
138-
SEXP this = VECTOR_ELT(x, i);
139-
if (
140-
!is_growable(this)
141-
#ifndef USE_GROWABLE_ALREP
142-
&& !ALTREP(this)
143-
#endif
144-
) SET_VECTOR_ELT(x, i, make_growable(this));
145-
}
146-
return R_NilValue;
147-
}

0 commit comments

Comments
 (0)