Skip to main content

permanent_charsxp

Function permanent_charsxp 

Source
#[doc(hidden)]
pub(crate) fn permanent_charsxp(name: &CStr) -> SEXP
Expand description

Get a permanent CHARSXP for a string by going through Rf_install + PRINTNAME.

Symbols are never GC’d, so the CHARSXP from PRINTNAME is valid forever. This avoids the Rf_mkCharLenCE hash lookup on repeated calls.

Used by cached_strsxp!pub(crate) so the macro can reference it from any module.