Skip to main content

miniextendr_set_altrep_pkg_name

Function miniextendr_set_altrep_pkg_name 

Source
#[doc(hidden)]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn miniextendr_set_altrep_pkg_name( name: *const c_char, )
Expand description

Set the ALTREP package name. Called from C entrypoint.

§Safety

The provided pointer must point to a valid null-terminated C string that lives for the duration of the R session.

The strict requirement is narrower: R copies the bytes via install() inside each R_make_alt*_class call that consults this global (see RegisterClass in R’s src/main/altrep.c), so the pointer only has to remain valid across those calls. We keep the session-lifetime contract because we don’t track which registrations are still pending; a string literal passed from C satisfies both.