infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
Ch02_StructByValue.c File Reference

Cookbook Chapter 2: Small Structs Passed by Value. More...

#include <infix/infix.h>
#include <stdio.h>
Include dependency graph for Ch02_StructByValue.c:

Classes

struct  Point
 A simple struct with two doubles, often used to test pass-by-value on registers. More...
 

Functions

static Point move_point (Point p, double dx)
 
int main ()
 

Detailed Description

Cookbook Chapter 2: Small Structs Passed by Value.

This example demonstrates calling a function that takes a small struct argument. For most ABIs, a small struct like this will be passed directly in CPU registers rather than on the stack. infix automatically handles this ABI-specific detail.

Function Documentation

◆ main()

int main ( void  )

◆ move_point()

static Point move_point ( Point  p,
double  dx 
)
static