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

Cookbook Chapter 5: Handling Strings and Semantic Types. More...

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

Functions

void introspect_and_print (const char *signature, infix_registry_t *registry)
 
int main ()
 

Detailed Description

Cookbook Chapter 5: Handling Strings and Semantic Types.

This example demonstrates the recommended pattern for handling types like strings (char*, wchar_t*) in a way that is robust for introspection.

The core idea is to use the infix Type Registry to create "semantic aliases" that describe the intent of a type, not just its structure. A language binding can then inspect the name of the type to determine how to correctly marshal data.

Function Documentation

◆ introspect_and_print()

void introspect_and_print ( const char *  signature,
infix_registry_t registry 
)

◆ main()

int main ( void  )