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

Cookbook Chapter 2: Advanced Named Types (Recursive & Forward-Declared). More...

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

Classes

struct  Manager
struct  Employee

Typedefs

typedef struct Employee Employee
typedef struct Manager Manager

Functions

static const char * get_manager_name (Employee *e)
int main ()

Detailed Description

Cookbook Chapter 2: Advanced Named Types (Recursive & Forward-Declared).

This example demonstrates the full power of the infix Type Registry to model complex, real-world C data structures. It shows how to define:

  1. A recursive type (a linked list @Node).
  2. Mutually-recursive types (@Employee and @Manager) using forward declarations.

Typedef Documentation

◆ Employee

typedef struct Employee Employee

◆ Manager

typedef struct Manager Manager

Function Documentation

◆ get_manager_name()

const char * get_manager_name ( Employee * e)
static

◆ main()

int main ( void )