Expand description
RValue ↔ SEXP conversion.
Converts between miniR’s RValue types and the C-compatible SEXP layout
used by native package code. Handles the type differences:
- miniR Integer is i64, R INTEGER is i32 → truncate with overflow check
- miniR Logical is
Option<bool>, R LOGICAL is i32 (TRUE=1, FALSE=0, NA=NA_INTEGER) - miniR uses NullableBuffer bitmaps, R uses sentinel values (NA_REAL, NA_INTEGER)
Functions§
- apply_
attrs_ 🔒to_ sexp - Apply RValue attributes (dim, names, class, dimnames, etc.) to a SEXP.
- character_
to_ 🔒sexp - complex_
to_ 🔒sexp - double_
to_ 🔒sexp - env_
from_ ⚠sexp - Extract an Environment from an ENVSXP. Returns None if the SEXP isn’t an ENVSXP.
- env_
to_ 🔒sexp - Convert an Environment to an ENVSXP.
- expr_
to_ 🔒sexp - Convert an Expr to a SEXP for building LANGSXP pairlists.
- integer_
to_ 🔒sexp - language_
to_ 🔒sexp - Convert a Language (call) to a LANGSXP pairlist.
- list_
to_ 🔒sexp - logical_
to_ 🔒sexp - raw_
to_ 🔒sexp - read_
sexp_ 🔒 ⚠attrs - Read attributes from a SEXP pairlist (LISTSXP chain) and apply to an RValue.
- rvalue_
to_ sexp - Convert an RValue to a SEXP for passing to native C code.
- sexp_
complex_ 🔒 ⚠to_ rvalue - sexp_
int_ 🔒 ⚠to_ rvalue - sexp_
lgl_ 🔒 ⚠to_ rvalue - sexp_
raw_ 🔒 ⚠to_ rvalue - sexp_
real_ 🔒 ⚠to_ rvalue - sexp_
str_ 🔒 ⚠to_ rvalue - sexp_
to_ ⚠rvalue - Convert a SEXP result from native C code back to an RValue.
- sexp_
vec_ 🔒 ⚠to_ rvalue - vector_
to_ 🔒sexp