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

Cookbook Chapter 2: Receiving a Struct from a Function. More...

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

Classes

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

Functions

static Point make_point (double x, double y)
 
int main ()
 

Detailed Description

Cookbook Chapter 2: Receiving a Struct from a Function.

This example demonstrates calling a function that returns a struct by value. infix handles the ABI-specific details of how the struct is returned, whether it's in one or more registers or via a hidden pointer passed by the caller.

Function Documentation

◆ main()

int main ( void  )

◆ make_point()

static Point make_point ( double  x,
double  y 
)
static