We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1c4f76 commit 87315a4Copy full SHA for 87315a4
src/data.table.h
@@ -105,7 +105,11 @@
105
# define R_duplicateAsResizable(x) R_duplicateAsResizable_(x)
106
# define R_resizeVector(x, newlen) SETLENGTH(x, newlen)
107
# define R_maxLength(x) TRUELENGTH(x)
108
-# define R_isResizable(x) ((bool)(IS_GROWABLE(x)))
+# define R_isResizable(x) R_isResizable_(x)
109
+ static inline bool R_isResizable_(SEXP x) {
110
+ // IS_GROWABLE also checks for TRUELENGTH < XLENGTH
111
+ return (LEVELS(x) & 0x20) && TRUELENGTH(x);
112
+ }
113
#endif
114
115
// init.c
0 commit comments