[R-pkg-devel] Using DOTS from C API
Josiah Parry
jo@|@h@p@rry @end|ng |rom gm@||@com
Mon Aug 18 20:25:57 CEST 2025
*Question:* what is the best way to access a DOTSXP from R's C API in a
function call.
Over at extendr (1) we'd like to be able to utilize `...` from the body of
a Rust function—with initial motivation being to support S3 generics like
print(x, ...).
I don't see any recommendations / or mention of accessing DOTSXP in WRE.
The closest I can find is from R internals (2) repo which says
"Easiest to get to with findVar(R_DotsSymbol, env) or similar."
From R's C API would this mean we would want to use something like:
findVar(R_DotsSymbol, R_GetCurrentEnv()) to get the dots pairlist from the
function's environment?
1) https://extendr.rs
2)
https://github.com/hadley/r-internals/blob/16c1d73b635ccecec8b1f396a8935a8dd96126e4/pairlists.md
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list