|
infix
A JIT-Powered FFI Library for C
|
Cookbook Chapter 2: Large Structs Passed by Reference. More...
Classes | |
| struct | LargeStruct |
| A struct larger than 16 bytes, guaranteed to be passed by reference on most ABIs. More... | |
Functions | |
| static int | get_first_element (LargeStruct s) |
| int | main () |
Cookbook Chapter 2: Large Structs Passed by Reference.
This example demonstrates how infix handles structs that are too large to fit in registers. The C ABI specifies that such structs are passed by reference (i.e., a pointer to the struct is passed) or on the stack. From the infix user's perspective, the signature and call process are identical to a small struct; the library's ABI logic automatically handles the correct passing convention.
|
static |
| int main | ( | void | ) |