|
infix
A JIT-Powered FFI Library for C
|
Cookbook Chapter 2: Working with Fixed-Size Arrays. More...
Functions | |
| static int64_t | sum_array_elements (const int64_t *arr, size_t count) |
| int | main () |
Cookbook Chapter 2: Working with Fixed-Size Arrays.
This example clarifies a common point of confusion when working with arrays in C. When an array is passed as a function argument, it "decays" into a pointer to its first element. Therefore, the infix signature must describe it as a pointer, not an array type.
The [N:type] array syntax is only used to describe an array when it is a member of a struct or a return type (a rare case).
| int main | ( | void | ) |
|
static |