[R-pkg-devel] Why is Rf_Seql hidden?

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Sat Nov 9 08:19:52 CET 2024


9 ноября 2024 г. 09:44:27 GMT+03:00, Tony Wilkes <tony_a_wilkes using outlook.com> пишет: 
> 1) ​Why is Rf_Seql() hidden? (what would be the problem if it were made public?)

It accepts two SEXP arguments but then performs operations on them that are only valid for CHARSXP objects. This might be unsafe.

> 2) What would be an alternative way to re-create Rf_Seql (a way that is relatively stable)?

How about R_compute_identical()? It tests for TYPEOF() equality and then quickly jumps to Seql() for CHARSXP values. It's listed among "experimental" APIs and so may grow more flags [*] in the future, but they don't seem relevant for CHARSXPs.

-- 
Best regards,
Ivan

[*] Unofficial description: https://aitap.codeberg.page/R-api/#R_005fcompute_005fidentical



More information about the R-package-devel mailing list