|
infix
A JIT-Powered FFI Library for C
|
Cookbook Chapter 4: Calling Variadic Functions like printf
More...
Functions | |
| int | main () |
Cookbook Chapter 4: Calling Variadic Functions like printf
This example demonstrates how to call a C function that takes a variable number of arguments, such as printf.
The key is the semicolon (;) in the signature string, which separates the fixed arguments from the variadic arguments. The signature must exactly match the types you are passing in a specific call. You would need a different trampoline for printf("%s", ...) versus printf("%d", ...).
| int main | ( | void | ) |