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

Cookbook Chapter 8: The Full Manual API Lifecycle. More...

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

Classes

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

Functions

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

Detailed Description

Cookbook Chapter 8: The Full Manual API Lifecycle.

This example demonstrates how to create a trampoline without using the signature parser. This is the "Manual API" and is ideal for performance-critical applications or language bindings that construct type information programmatically.

The process involves:

  1. Creating a memory arena.
  2. Building infix_type objects for all required types (structs, primitives) by allocating them from the arena.
  3. Calling infix_forward_create_manual with the constructed types.
  4. Destroying the arena and trampoline when done.

Function Documentation

◆ main()

int main ( void  )

◆ move_point()

Point move_point ( Point  p,
double  dx 
)