| tcc_field_addr | R Documentation |
Creates functions that return pointers to specific struct fields. Useful for passing field pointers to C functions or for container_of.
tcc_field_addr(ffi, struct_name, fields)
ffi |
A tcc_ffi object |
struct_name |
Struct name |
fields |
Character vector of field names |
Updated tcc_ffi object
## Not run:
ffi <- tcc_ffi() |>
tcc_struct("point", list(x = "f64", y = "f64")) |>
tcc_field_addr("point", c("x", "y")) # point_x_addr(), point_y_addr()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.