| tcc_struct | R Documentation |
Generate R-callable helpers for struct allocation, field access, and pointer management. The struct must be defined in a header.
tcc_struct(ffi, name, accessors)
ffi |
A tcc_ffi object |
name |
Struct name (as defined in C header) |
accessors |
Named list of field accessors where
names are field names and values are FFI types (e.g., list(x="f64", y="f64")).
Named nested struct fields can use |
Updated tcc_ffi object
## Not run:
ffi <- tcc_ffi() |>
tcc_header("#include <point.h>") |>
tcc_struct("point", list(x = "f64", y = "f64", id = "i32"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.