Skip to content

Commit 8994c59

Browse files
Merge branch 'master' into new_branch
2 parents 3044358 + 299d44d commit 8994c59

File tree

6 files changed

+24
-10
lines changed

6 files changed

+24
-10
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: data.table
2-
Version: 1.16.99
2+
Version: 1.17.99
33
Title: Extension of `data.frame`
44
Depends: R (>= 3.3.0)
55
Imports: methods

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ some:
1818

1919
.PHONY: clean
2020
clean:
21-
$(RM) data.table_1.16.99.tar.gz
21+
$(RM) data.table_1.17.99.tar.gz
2222
$(RM) src/*.o
2323
$(RM) src/*.so
2424

@@ -28,7 +28,7 @@ build:
2828

2929
.PHONY: install
3030
install:
31-
$(R) CMD INSTALL data.table_1.16.99.tar.gz
31+
$(R) CMD INSTALL data.table_1.17.99.tar.gz
3232

3333
.PHONY: uninstall
3434
uninstall:
@@ -40,7 +40,7 @@ test:
4040

4141
.PHONY: check
4242
check:
43-
_R_CHECK_CRAN_INCOMING_REMOTE_=false $(R) CMD check data.table_1.16.99.tar.gz --as-cran --ignore-vignettes --no-stop-on-test-error
43+
_R_CHECK_CRAN_INCOMING_REMOTE_=false $(R) CMD check data.table_1.17.99.tar.gz --as-cran --ignore-vignettes --no-stop-on-test-error
4444

4545
.PHONY: revision
4646
revision:

NEWS.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
**If you are viewing this file on CRAN, please check [latest news on GitHub](https://github.com/Rdatatable/data.table/blob/master/NEWS.md) where the formatting is also better.**
22

3-
# data.table [v1.16.99](https://github.com/Rdatatable/data.table/milestone/31) (in development)
3+
# data.table [v1.17.99](https://github.com/Rdatatable/data.table/milestone/35) (in development)
4+
5+
6+
7+
# data.table [v1.17.0](https://github.com/Rdatatable/data.table/milestone/34) (20 Feb 2025)
48

59
## POTENTIALLY BREAKING CHANGES
610

@@ -16,7 +20,7 @@ rowwiseDT(
1620
a=,b=,c=, d=,
1721
1, 2, "a", 2:3,
1822
3, 4, "b", list("e"),
19-
5, 6, "c", ~a+b,
23+
5, 6, "c", ~a+b
2024
)
2125
#> a b c d
2226
#> <num> <num> <char> <list>

src/dogroups.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,11 @@ SEXP growVector(SEXP x, const R_len_t newlen)
535535
if (isNull(x)) error(_("growVector passed NULL"));
536536
PROTECT(newx = allocVector(TYPEOF(x), newlen)); // TO DO: R_realloc(?) here?
537537
if (newlen < len) len=newlen; // i.e. shrink
538+
if (!len) { // cannot memcpy invalid pointer, #6819
539+
keepattr(newx, x);
540+
UNPROTECT(1);
541+
return newx;
542+
}
538543
switch (TYPEOF(x)) {
539544
case RAWSXP: memcpy(RAW(newx), RAW(x), len*SIZEOF(x)); break;
540545
case LGLSXP: memcpy(LOGICAL(newx), LOGICAL(x), len*SIZEOF(x)); break;

src/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,6 @@ SEXP initLastUpdated(SEXP var) {
372372

373373
SEXP dllVersion(void) {
374374
// .onLoad calls this and checks the same as packageVersion() to ensure no R/C version mismatch, #3056
375-
return(ScalarString(mkChar("1.16.99")));
375+
return(ScalarString(mkChar("1.17.99")));
376376
}
377377

src/utils.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@ SEXP copyAsPlain(SEXP x) {
222222
}
223223
const int64_t n = XLENGTH(x);
224224
SEXP ans = PROTECT(allocVector(TYPEOF(x), n));
225+
// aside: unlike R's duplicate we do not copy truelength here; important for dogroups.c which uses negative truelenth to mark its specials
226+
if (ALTREP(ans))
227+
internal_error(__func__, "copyAsPlain returning ALTREP for type '%s'", type2char(TYPEOF(x))); // # nocov
228+
if (!n) { // cannot memcpy invalid pointer, #6819
229+
DUPLICATE_ATTRIB(ans, x);
230+
UNPROTECT(1);
231+
return ans;
232+
}
225233
switch (TYPEOF(x)) {
226234
case RAWSXP:
227235
memcpy(RAW(ans), RAW(x), n*sizeof(Rbyte));
@@ -250,9 +258,6 @@ SEXP copyAsPlain(SEXP x) {
250258
internal_error(__func__, "type '%s' not supported in %s", type2char(TYPEOF(x)), "copyAsPlain()"); // # nocov
251259
}
252260
DUPLICATE_ATTRIB(ans, x);
253-
// aside: unlike R's duplicate we do not copy truelength here; important for dogroups.c which uses negative truelenth to mark its specials
254-
if (ALTREP(ans))
255-
internal_error(__func__, "copyAsPlain returning ALTREP for type '%s'", type2char(TYPEOF(x))); // # nocov
256261
UNPROTECT(1);
257262
return ans;
258263
}

0 commit comments

Comments
 (0)