Skip to content

Commit 071d3a3

Browse files
authored
Merge branch 'master' into issue6846
2 parents af24149 + 6a8634e commit 071d3a3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
1. Custom binary operators from the `lubridate` package now work with objects of class `IDate` as with a `Date` subclass, [#6839](https://github.com/Rdatatable/data.table/issues/6839). Thanks @emallickhossain for the report and @aitap for the fix.
1212

13+
## NOTES
14+
15+
1. Continued work to remove non-API C functions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PRs and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/.
16+
1317
# data.table [v1.17.0](https://github.com/Rdatatable/data.table/milestone/34) (20 Feb 2025)
1418

1519
## POTENTIALLY BREAKING CHANGES

src/data.table.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@
4242
/* we mean the encoding bits, not CE_NATIVE in a UTF-8 locale */
4343
#define IS_UTF8(x) (getCharCE(x) == CE_UTF8)
4444
#define IS_LATIN(x) (getCharCE(x) == CE_LATIN1)
45-
#define IS_ASCII(x) (LEVELS(x) & 64) // API expected in R >= 4.5
45+
// TODO: remove the `R_SVN_VERSION` check when R 4.5.0 is released (circa Apr. 2025)
46+
#if R_VERSION < R_Version(4, 5, 0) || R_SVN_REVISION < 86789
47+
# define IS_ASCII(x) (LEVELS(x) & 64)
48+
#else
49+
# define IS_ASCII(x) (Rf_charIsASCII(x)) // no CE_ASCII
50+
#endif
4651
#define IS_TRUE(x) (TYPEOF(x)==LGLSXP && LENGTH(x)==1 && LOGICAL(x)[0]==TRUE)
4752
#define IS_FALSE(x) (TYPEOF(x)==LGLSXP && LENGTH(x)==1 && LOGICAL(x)[0]==FALSE)
4853
#define IS_TRUE_OR_FALSE(x) (TYPEOF(x)==LGLSXP && LENGTH(x)==1 && LOGICAL(x)[0]!=NA_LOGICAL)

0 commit comments

Comments
 (0)