| tcc_union | R Documentation |
Generate R-callable helpers for union allocation and member access. The union must be defined in a header.
tcc_union(ffi, name, members, active = NULL)
ffi |
A tcc_ffi object |
name |
Union name (as defined in C header) |
members |
Named list of union members with FFI types |
active |
Default active member for accessors |
Updated tcc_ffi object
## Not run:
ffi <- tcc_ffi() |>
tcc_union("data_variant",
members = list(as_int = "i32", as_float = "f32"),
active = "as_int"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.