|
infix
A JIT-Powered FFI Library for C
|
Cookbook Chapter 5: Handling Strings and Semantic Types. More...
Functions | |
| void | introspect_and_print (const char *signature, infix_registry_t *registry) |
| int | main () |
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.
| void introspect_and_print | ( | const char * | signature, |
| infix_registry_t * | registry | ||
| ) |
| int main | ( | void | ) |