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
* frev: drop SET_ATTRIB
Instead, backport and use CLEAR_ATTRIB (R >= 4.5).
* mergeIndexAttrib: drop SET_ATTRIB
Use SHALLOW_DUPLICATE_ATTRIB (R >= 3.3) for the simple case. Also,
Backport ANY_ATTRIB (R >= 4.5) instead of testing !isNull(ATTRIB(.)).
* cbindlist: use ANY_ATTRIB
* nafillR: use ANY_ATTRIB
* Backport R_mapAttrib
* anySpecialStatic: switch to R_mapAttrib
* dogroups: construct rownames anew
Instead of trying to walk ATTRIB in search of the compact 'rownames'
attribute to modify, install it anew, take note of the returned
reference to the value being installed (a different one!) and modify
that.
* mergeIndexAttrib: switch to R_mapAttrib
* assign: factor out index fixup
Instead of walking the attribute list directly, use R_mapAttrib().
Create a hash table of index names instead of relying on chin() and a
temporary string vector. Move all temporary allocations onto the R heap.
* assign: drop indexLength
* assign: fix index unmarking
* Comments, better field names
* Update src/dogroups.c
Co-authored-by: Benjamin Schwendinger <[email protected]>
* mapAttrib: protect the attribute value
Otherwise the callback could remove the attribute and end up with the
value unprotected. Protect the attribute tag as well for uniformity.
Co-Authored-By: HughParsonage <[email protected]>
* dogroups: look up rownames using mapAttrib
This solution is closer to the working approach previously taken by the code.
* Fix comment, function name
* Protect the newly found rownames attribute
* add NEWS entry
---------
Co-authored-by: HughParsonage <[email protected]>
Co-authored-by: Benjamin Schwendinger <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
Copy file name to clipboardExpand all lines: NEWS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@
26
26
27
27
3. Vignettes are now built using `litedown` instead of `knitr`, [#6394](https://github.com/Rdatatable/data.table/issues/6394). Thanks @jangorecki for the suggestion and @ben-schwen and @aitap for the implementation.
28
28
29
+
4. Removed use of non-API macros `ATTRIB`, `SET_ATTRIB`, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks @aitap for the continued assiduous work here.
30
+
29
31
### BUG FIXES
30
32
31
33
1.`fread()` with `skip=0` and `(header=TRUE|FALSE)` no longer skips the first row when it has fewer fields than subsequent rows, [#7463](https://github.com/Rdatatable/data.table/issues/7463). Thanks @emayerhofer for the report and @ben-schwen for the fix.
// For a given index, find out if it sorts a column that has just been assigned. If so, shorten the index (if an equivalent one doesn't already exist) or remove it altogether.
SEXPdtnames=PROTECT(getAttrib(dt, R_NamesSymbol)); nprotect++; // added here to fix #91 - `:=` did not issue recycling warning during "by"
133
-
// fetch rownames of .SD. rownames[1] is set to -thislen for each group, in case .SD is passed to
144
+
145
+
// override rownames of .SD. rownames[1] is set to -thislen for each group, in case .SD is passed to
134
146
// non data.table aware package that uses rownames
135
-
for (s=ATTRIB(SD); s!=R_NilValue&&TAG(s)!=R_RowNamesSymbol; s=CDR(s)); // getAttrib0 basically but that's hidden in attrib.c; #loop_counter_not_local_scope_ok
136
-
if (s==R_NilValue) error(_("row.names attribute of .SD not found"));
if (rownames==NULL) error(_("row.names attribute of .SD not found"));
138
149
if (!isInteger(rownames) ||LENGTH(rownames)!=2||INTEGER(rownames)[0]!=NA_INTEGER) error(_("row.names of .SD isn't integer length 2 with NA as first item; i.e., .set_row_names(). [%s %d %d]"),type2char(TYPEOF(rownames)),LENGTH(rownames),INTEGER(rownames)[0]);
139
150
140
151
// fetch names of .SD and prepare symbols. In case they are copied-on-write by user assigning to those variables
0 commit comments