View source: R/treesitter_helpers.R
| tcc_generate_bindings | R Documentation |
Generate bindings from header declarations
tcc_generate_bindings(
ffi = NULL,
header,
mapper = tcc_map_c_type_to_ffi,
functions = TRUE,
structs = TRUE,
unions = TRUE,
enums = TRUE,
globals = TRUE,
bitfield_type = "u8",
include_bitfields = TRUE
)
ffi |
A tcc_ffi object. If NULL, a new one is created. |
header |
Character scalar containing C declarations. |
mapper |
Function to map C types to FFI types. |
functions |
Logical; generate |
structs |
Logical; generate |
unions |
Logical; generate |
enums |
Logical; generate |
globals |
Logical; generate |
bitfield_type |
FFI type to use for bitfields. |
include_bitfields |
Whether to include bitfields. |
Updated tcc_ffi object.
## Not run:
header <- "double sqrt(double x); struct point { double x; double y; };"
ffi <- tcc_generate_bindings(tcc_ffi(), header)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.