diff --git a/R/utils.R b/R/utils.R index 4fc6b6cae9..a73f1d9c7b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -67,9 +67,6 @@ if (inherits(rep_len(Sys.Date(), 1L), "Date")) { safe_rep_len = function(x, n) rep(x, length.out = n) # nolint: rep_len_linter. } -# endsWith no longer used from #5097 so no need to backport; prevent usage to avoid dev delay until GLCI's R 3.1.0 test -endsWith = function(...) internal_error("use endsWithAny instead of base::endsWith") - startsWithAny = function(x,y) .Call(CstartsWithAny, x, y, TRUE) endsWithAny = function(x,y) .Call(CstartsWithAny, x, y, FALSE) # For fread.R #5097 we need if any of the prefixes match, which one, and can return early on the first match diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index 4277ed1533..5aa435cf07 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -42,7 +42,6 @@ if (exists("test.data.table", .GlobalEnv, inherits=FALSE)) { cube.data.table = data.table:::cube.data.table dcast.data.table = data.table:::dcast.data.table DTfun = data.table:::DT - endsWith = data.table:::endsWith endsWithAny = data.table:::endsWithAny forder = data.table:::forder forderv = data.table:::forderv @@ -17316,7 +17315,6 @@ test(2194.6, endsWithAny(character(), 'a'), error="Internal error.*types or leng needed_chars = c("\u0105", "\u017E", "\u016B", "\u012F", "\u0173", "\u0117", "\u0161", "\u0119") txt = parse(text='readLines(testDir("issue_563_fread.txt"))') test(2194.7, requires_utf8=needed_chars, endsWithAny(eval(txt), 'B'), error="Internal error.*types or lengths incorrect") # txt is length 5 -test(2194.8, endsWith('abcd', 'd'), error="Internal error.*use endsWithAny") # uniqueN(x, by=character()) was internal error, #4594 DT = data.table(idx=c(1L,2L,1L,3L), value="val") diff --git a/src/data.table.h b/src/data.table.h index 4c4d112df0..7e815de471 100644 --- a/src/data.table.h +++ b/src/data.table.h @@ -2,17 +2,6 @@ #include "dt_stdio.h" // PRId64 and PRIu64 #include #include -#if R_VERSION < R_Version(3, 5, 0) // R-exts$6.14 -# define ALTREP(x) 0 // #2866 -# define USE_RINTERNALS // #3301 -# define DATAPTR_RO(x) ((const void *)DATAPTR(x)) -# define STRING_PTR_RO STRING_PTR -# define INTEGER_RO INTEGER -# define REAL_RO REAL -# define COMPLEX_RO COMPLEX -# define RAW_RO RAW -# define LOGICAL_RO LOGICAL -#endif #if R_VERSION < R_Version(4, 5, 0) # define R_getVar(x, env, inherits) findVar(x, env) # define isDataFrame(x) isFrame(x) // #6180