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
copyMostAttrib(VECTOR_ELT(groups, j), VECTOR_ELT(BY,i)); // not names, otherwise test 778 would fail
102
102
SET_STRING_ELT(bynames, i, STRING_ELT(getAttrib(groups,R_NamesSymbol), j));
103
103
defineVar(install(CHAR(STRING_ELT(bynames,i))), VECTOR_ELT(BY,i), env); // by vars can be used by name in j as well as via .BY
104
-
if (SIZEOF(VECTOR_ELT(BY,i))==0)
104
+
if (RTYPE_SIZEOF(VECTOR_ELT(BY,i))==0)
105
105
internal_error(__func__, "unsupported size-0 type '%s' in column %d of 'by' should have been caught earlier", type2char(TYPEOF(VECTOR_ELT(BY, i))), i+1); // # nocov
106
106
SET_TRUELENGTH(VECTOR_ELT(BY,i), -1); // marker for anySpecialStatic(); see its comments
r_type_sizes[VECSXP] =sizeof(SEXP*); r_type_order[VECSXP] =6; // list column
172
172
if (sizeof(char*)>8) error(_("Pointers are %zu bytes, greater than 8. We have not tested on any architecture greater than 64bit yet."), sizeof(char*));
173
173
// One place we need the largest sizeof is the working memory malloc in reorder.c
if (SIZEOF(v)!=4&&SIZEOF(v)!=8&&SIZEOF(v)!=16&&SIZEOF(v)!=1)
22
-
error(_("Item %d of list is type '%s' which isn't yet supported (SIZEOF=%zu)"), i+1, type2char(TYPEOF(v)), SIZEOF(v));
21
+
if (RTYPE_SIZEOF(v)!=4&&RTYPE_SIZEOF(v)!=8&&RTYPE_SIZEOF(v)!=16&&RTYPE_SIZEOF(v)!=1)
22
+
error(_("Item %d of list is type '%s' which isn't yet supported (RTYPE_SIZEOF=%zu)"), i+1, type2char(TYPEOF(v)), RTYPE_SIZEOF(v));
23
23
if (length(v)!=nrow)
24
24
error(_("Column %d is length %d which differs from length of column 1 (%d). Invalid data.table."), i+1, length(v), nrow);
25
-
if (SIZEOF(v) >maxSize)
26
-
maxSize=SIZEOF(v);
25
+
if (RTYPE_SIZEOF(v) >maxSize)
26
+
maxSize=RTYPE_SIZEOF(v);
27
27
if (ALTREP(v)) SET_VECTOR_ELT(x, i, copyAsPlain(v));
28
28
}
29
29
copySharedColumns(x); // otherwise two columns which point to the same vector would be reordered and then re-reordered, issues linked in PR#3768
30
30
} else {
31
-
if (SIZEOF(x)!=4&&SIZEOF(x)!=8&&SIZEOF(x)!=16&&SIZEOF(x)!=1)
32
-
error(_("reorder accepts vectors but this non-VECSXP is type '%s' which isn't yet supported (SIZEOF=%zu)"), type2char(TYPEOF(x)), SIZEOF(x));
31
+
if (RTYPE_SIZEOF(x)!=4&&RTYPE_SIZEOF(x)!=8&&RTYPE_SIZEOF(x)!=16&&RTYPE_SIZEOF(x)!=1)
32
+
error(_("reorder accepts vectors but this non-VECSXP is type '%s' which isn't yet supported (RTYPE_SIZEOF=%zu)"), type2char(TYPEOF(x)), RTYPE_SIZEOF(x));
33
33
if (ALTREP(x)) internal_error(__func__, "cannot reorder an ALTREP vector. Please see NEWS item 2 in v1.11.4"); // # nocov
0 commit comments