Skip to main content

classify_null_address

Function classify_null_address 

Source
pub(crate) unsafe fn classify_null_address<T: TypedExternal>(
    sexp: SEXP,
) -> NullAddress
Expand description

Reads prot[0] of a pointer without an address and says what it is for T. A save is T’s when its crate and type name are T’s (saved_identity): the module path is left out, so moving a type to another module keeps its saves (#2186). A pointer with a live address is never classified: Any::downcast decides its type. Symbol names live for the session, so the borrowed parts are 'static.

§Safety

Must be called from R’s main thread with a valid EXTPTRSXP.