infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
High-Level Signature API

The primary, recommended API for creating trampolines from human-readable strings. More...

Collaboration diagram for High-Level Signature API:

Modules

 Type System
 The core data structures and APIs for describing C types and function signatures.
 
 Memory Management
 APIs for memory management, including custom allocators and arenas.
 
 Named Type Registry
 APIs for defining, storing, and reusing complex types by name.
 
 Registry Introspection API
 APIs for inspecting and serializing the contents of a named type registry.
 
 Dynamic Library & Globals API
 Cross-platform functions for loading shared libraries and accessing exported symbols.
 
 Manual API
 A lower-level, programmatic API for creating trampolines from infix_type objects.
 
 Introspection API
 Functions for inspecting the properties of trampolines and infix_type objects at runtime.
 
 Error Handling API
 Functions and types for detailed, thread-safe error reporting.
 

Typedefs

typedef void(* infix_unbound_cif_func) (void *, void *, void **)
 A function pointer type for an unbound forward trampoline.
 
typedef void(* infix_cif_func) (void *, void **)
 A function pointer type for a bound forward trampoline.
 
typedef void(* infix_closure_handler_fn) (infix_context_t *, void *, void **)
 A function pointer type for a generic closure handler.
 

Enumerations

enum  infix_status {
  INFIX_SUCCESS = 0 , INFIX_ERROR_ALLOCATION_FAILED , INFIX_ERROR_INVALID_ARGUMENT , INFIX_ERROR_UNSUPPORTED_ABI ,
  INFIX_ERROR_LAYOUT_FAILED , INFIX_ERROR_PROTECTION_FAILED , INFIX_ERROR_
}
 Enumerates the possible status codes returned by infix API functions. More...
 

Functions

c23_nodiscard infix_status infix_forward_create (infix_forward_t **, const char *, void *, infix_registry_t *)
 Creates a "bound" forward trampoline from a signature string.
 
c23_nodiscard infix_status infix_forward_create_unbound (infix_forward_t **, const char *, infix_registry_t *)
 Creates an "unbound" forward trampoline from a signature string.
 
c23_nodiscard infix_status infix_forward_create_in_arena (infix_forward_t **, infix_arena_t *, const char *, void *, infix_registry_t *)
 Creates a "bound" forward trampoline within a user-provided arena.
 
c23_nodiscard infix_status infix_reverse_create_callback (infix_reverse_t **, const char *, void *, infix_registry_t *)
 Creates a type-safe reverse trampoline (callback).
 
c23_nodiscard infix_status infix_reverse_create_closure (infix_reverse_t **, const char *, infix_closure_handler_fn, void *, infix_registry_t *)
 Creates a generic reverse trampoline (closure) for stateful callbacks.
 
c23_nodiscard infix_status infix_signature_parse (const char *, infix_arena_t **, infix_type **, infix_function_argument **, size_t *, size_t *, infix_registry_t *)
 Parses a full function signature string into its constituent parts.
 
c23_nodiscard infix_status infix_type_from_signature (infix_type **, infix_arena_t **, const char *, infix_registry_t *)
 Parses a signature string representing a single data type.
 

Variables

const charinfix_type_t::name
 
infix_type_category infix_type_t::category
 
size_t infix_type_t::size
 
size_t infix_type_t::alignment
 
bool infix_type_t::is_arena_allocated
 
infix_arena_tinfix_type_t::arena
 
infix_primitive_type_id   infix_type_t::primitive_id 
 Metadata for INFIX_TYPE_PRIMITIVE. More...
 
struct infix_type_t *   infix_type_t::pointee_type 
 
struct { 
 
   struct infix_type_t *   infix_type_t::pointee_type 
 
}   infix_type_t::pointer_info 
 Metadata for INFIX_TYPE_POINTER. More...
 
infix_struct_member *   infix_type_t::members 
 
size_t   infix_type_t::num_members 
 
struct { 
 
   infix_struct_member *   infix_type_t::members 
 
   size_t   infix_type_t::num_members 
 
}   infix_type_t::aggregate_info 
 Metadata for INFIX_TYPE_STRUCT and INFIX_TYPE_UNION. More...
 
struct infix_type_t *   infix_type_t::element_type 
 
size_t   infix_type_t::num_elements 
 
struct { 
 
   struct infix_type_t *   infix_type_t::element_type 
 
   size_t   infix_type_t::num_elements 
 
}   infix_type_t::array_info 
 Metadata for INFIX_TYPE_ARRAY. More...
 
struct infix_type_t *   infix_type_t::return_type 
 
infix_function_argument *   infix_type_t::args 
 
size_t   infix_type_t::num_args 
 
size_t   infix_type_t::num_fixed_args 
 
struct { 
 
   struct infix_type_t *   infix_type_t::return_type 
 
   infix_function_argument *   infix_type_t::args 
 
   size_t   infix_type_t::num_args 
 
   size_t   infix_type_t::num_fixed_args 
 
}   infix_type_t::func_ptr_info 
 Metadata for INFIX_TYPE_REVERSE_TRAMPOLINE. More...
 
struct infix_type_t *   infix_type_t::underlying_type 
 
struct { 
 
   struct infix_type_t *   infix_type_t::underlying_type 
 
}   infix_type_t::enum_info 
 Metadata for INFIX_TYPE_ENUM. More...
 
struct infix_type_t *   infix_type_t::base_type 
 
struct { 
 
   struct infix_type_t *   infix_type_t::base_type 
 
}   infix_type_t::complex_info 
 Metadata for INFIX_TYPE_COMPLEX. More...
 
struct infix_type_t *   infix_type_t::element_type 
 
size_t   infix_type_t::num_elements 
 
struct { 
 
   struct infix_type_t *   infix_type_t::element_type 
 
   size_t   infix_type_t::num_elements 
 
}   infix_type_t::vector_info 
 Metadata for INFIX_TYPE_VECTOR. More...
 
const char *   infix_type_t::name 
 
infix_aggregate_category_t   infix_type_t::aggregate_category 
 
struct { 
 
   const char *   infix_type_t::name 
 
   infix_aggregate_category_t   infix_type_t::aggregate_category 
 
}   infix_type_t::named_reference 
 Metadata for INFIX_TYPE_NAMED_REFERENCE. More...
 
union { 
 
   infix_primitive_type_id   infix_type_t::primitive_id 
 Metadata for INFIX_TYPE_PRIMITIVE. More...
 
   struct { 
 
      struct infix_type_t *   infix_type_t::pointee_type 
 
   }   infix_type_t::pointer_info 
 Metadata for INFIX_TYPE_POINTER. More...
 
   struct { 
 
      infix_struct_member *   infix_type_t::members 
 
      size_t   infix_type_t::num_members 
 
   }   infix_type_t::aggregate_info 
 Metadata for INFIX_TYPE_STRUCT and INFIX_TYPE_UNION. More...
 
   struct { 
 
      struct infix_type_t *   infix_type_t::element_type 
 
      size_t   infix_type_t::num_elements 
 
   }   infix_type_t::array_info 
 Metadata for INFIX_TYPE_ARRAY. More...
 
   struct { 
 
      struct infix_type_t *   infix_type_t::return_type 
 
      infix_function_argument *   infix_type_t::args 
 
      size_t   infix_type_t::num_args 
 
      size_t   infix_type_t::num_fixed_args 
 
   }   infix_type_t::func_ptr_info 
 Metadata for INFIX_TYPE_REVERSE_TRAMPOLINE. More...
 
   struct { 
 
      struct infix_type_t *   infix_type_t::underlying_type 
 
   }   infix_type_t::enum_info 
 Metadata for INFIX_TYPE_ENUM. More...
 
   struct { 
 
      struct infix_type_t *   infix_type_t::base_type 
 
   }   infix_type_t::complex_info 
 Metadata for INFIX_TYPE_COMPLEX. More...
 
   struct { 
 
      struct infix_type_t *   infix_type_t::element_type 
 
      size_t   infix_type_t::num_elements 
 
   }   infix_type_t::vector_info 
 Metadata for INFIX_TYPE_VECTOR. More...
 
   struct { 
 
      const char *   infix_type_t::name 
 
      infix_aggregate_category_t   infix_type_t::aggregate_category 
 
   }   infix_type_t::named_reference 
 Metadata for INFIX_TYPE_NAMED_REFERENCE. More...
 
infix_type_t::meta 
 A union containing metadata specific to the type's category.
 
const char * infix_struct_member_t::name
 
infix_typeinfix_struct_member_t::type
 
size_t infix_struct_member_t::offset
 
const char * infix_function_argument_t::name
 
infix_typeinfix_function_argument_t::type
 
infix_error_category_t infix_error_details_t::category
 
infix_error_code_t infix_error_details_t::code
 
size_t infix_error_details_t::position
 
long infix_error_details_t::system_error_code
 
char infix_error_details_t::message [256]
 

Detailed Description

The primary, recommended API for creating trampolines from human-readable strings.

This API provides the simplest and most powerful way to interact with infix. All functions in this group take a signature string and an optional type registry to parse and generate the required FFI trampolines.

Typedef Documentation

◆ infix_cif_func

typedef void(* infix_cif_func) (void *, void **)

A function pointer type for a bound forward trampoline.

This is the callable code generated by infix_forward_create. The target C function is "bound" into the JIT-compiled code, offering higher performance.

Parameters
return_value_ptrA pointer to a buffer to receive the return value. Can be nullptr for void returns.
args_arrayAn array of pointers, where each element points to an argument's value.

◆ infix_closure_handler_fn

typedef void(* infix_closure_handler_fn) (infix_context_t *, void *, void **)

A function pointer type for a generic closure handler.

This handler is used with infix_reverse_create_closure and is ideal for language bindings or stateful callbacks where the handler needs access to user-provided data.

Parameters
contextThe reverse trampoline context, from which user_data can be retrieved via infix_reverse_get_user_data.
return_value_ptrA pointer to a buffer where the handler must write the function's return value.
args_arrayAn array of pointers to the argument values passed by the native C caller.

◆ infix_unbound_cif_func

typedef void(* infix_unbound_cif_func) (void *, void *, void **)

A function pointer type for an unbound forward trampoline.

This is the callable code generated by infix_forward_create_unbound. It takes the target function as its first argument, allowing it to be reused for any C function that matches the signature it was created with.

Parameters
target_functionThe native C function to call.
return_value_ptrA pointer to a buffer to receive the return value. Can be nullptr if the return type is void.
args_arrayAn array of pointers, where each element points to an argument's value.

Enumeration Type Documentation

◆ infix_status

Enumerates the possible status codes returned by infix API functions.

Enumerator
INFIX_SUCCESS 

The operation completed successfully.

INFIX_ERROR_ALLOCATION_FAILED 

A memory allocation failed. Check infix_get_last_error for details.

INFIX_ERROR_INVALID_ARGUMENT 

An invalid argument was provided. Check infix_get_last_error.

INFIX_ERROR_UNSUPPORTED_ABI 

The current platform's ABI is not supported.

INFIX_ERROR_LAYOUT_FAILED 

Failed to calculate a valid memory layout for a type.

INFIX_ERROR_PROTECTION_FAILED 

Failed to set memory protection flags (e.g., for W^X).

INFIX_ERROR_ 

Placeholder to ensure enum is sized correctly.

Function Documentation

◆ infix_forward_create()

c23_nodiscard infix_status infix_forward_create ( infix_forward_t **  out_trampoline,
const char *  signature,
void *  target_function,
infix_registry_t registry 
)

Creates a "bound" forward trampoline from a signature string.

A bound trampoline is a highly optimized JIT-compiled function where the target C function's address is compiled directly into the executable code. This provides the best performance for forward calls, as it involves a direct call instruction to a known address. It is ideal for situations where you will call the same C function repeatedly.

The returned handle contains a callable function pointer of type infix_cif_func, which you can retrieve with infix_forward_get_code.

Parameters
[out]out_trampolineA pointer to an infix_forward_t* that will receive the created trampoline handle upon success.
[in]signatureThe signature string of the target function (e.g., "(int, int)->int").
[in]target_functionThe address of the C function to be called.
[in]registryAn optional type registry for resolving named types (@Name) used within the signature. Can be nullptr if no named types are used.
Returns
INFIX_SUCCESS on success, or an INFIX_ERROR_... code on failure.
Note
The caller is responsible for destroying the handle with infix_forward_destroy.
// C function to call
int add(int a, int b) { return a + b; }
infix_forward_t* trampoline = NULL;
const char* signature = "(int, int) -> int";
// Create a trampoline bound to the `add` function.
infix_status status = infix_forward_create(&trampoline, signature, (void*)add, NULL);
// Handle error...
}
// Get the callable JIT-compiled function pointer.
// Prepare arguments and return buffer.
int a = 10, b = 32;
void* args[] = { &a, &b };
int result;
// Call the C function through the FFI.
cif(&result, args); // result is now 42
infix_status status
Definition 103_unions.c:66
void * args[]
Definition 202_in_structs.c:64
static int add(int a, int b)
Definition Ch04_ThreadSafety.c:25
void(* infix_cif_func)(void *, void **)
A function pointer type for a bound forward trampoline.
Definition infix.h:371
c23_nodiscard infix_status infix_forward_create(infix_forward_t **, const char *, void *, infix_registry_t *)
Creates a "bound" forward trampoline from a signature string.
Definition trampoline.c:919
infix_status
Enumerates the possible status codes returned by infix API functions.
Definition infix.h:389
@ INFIX_SUCCESS
Definition infix.h:390
c23_nodiscard infix_cif_func infix_forward_get_code(infix_forward_t *)
Gets the callable function pointer from a bound forward trampoline.
Definition trampoline.c:288
void infix_forward_destroy(infix_forward_t *)
Destroys a forward trampoline and frees all associated memory.
Definition trampoline.c:523
Internal definition of a forward trampoline handle.
Definition infix_internals.h:94

◆ infix_forward_create_in_arena()

c23_nodiscard infix_status infix_forward_create_in_arena ( infix_forward_t **  out_trampoline,
infix_arena_t target_arena,
const char *  signature,
void *  target_function,
infix_registry_t registry 
)

Creates a "bound" forward trampoline within a user-provided arena.

When the target_arena is the same as the registry's arena, this function will share pointers to named types instead of deep-copying them, saving memory.

Parameters
[out]out_trampolineReceives the created trampoline handle.
[in]target_arenaThe arena to use for the trampoline's internal metadata.
[in]signatureThe signature string of the target function.
[in]target_functionThe address of the C function to be called.
[in]registryAn optional type registry.
Returns
INFIX_SUCCESS on success.

◆ infix_forward_create_unbound()

c23_nodiscard infix_status infix_forward_create_unbound ( infix_forward_t **  out_trampoline,
const char *  signature,
infix_registry_t registry 
)

Creates an "unbound" forward trampoline from a signature string.

An unbound trampoline is more flexible than a bound one. The target function address is not compiled in; instead, it is provided as the first argument at call time. This is useful for calling multiple C functions that share the same signature without needing to generate a separate trampoline for each one.

The returned handle contains a callable function pointer of type infix_unbound_cif_func, which you can retrieve with infix_forward_get_unbound_code.

Parameters
[out]out_trampolineA pointer to an infix_forward_t* that will receive the created trampoline handle upon success.
[in]signatureThe signature string of the target function.
[in]registryAn optional type registry for resolving named types. Can be nullptr.
Returns
INFIX_SUCCESS on success.
Note
The caller is responsible for destroying the handle with infix_forward_destroy.
int add(int a, int b) { return a + b; }
int subtract(int a, int b) { return a - b; }
infix_forward_t* trampoline = NULL;
const char* signature = "(int, int) -> int";
// Create one unbound trampoline for the signature.
infix_forward_create_unbound(&trampoline, signature, NULL);
int a = 10, b = 5;
void* args[] = { &a, &b };
int result;
// Call `add` by passing its address at call time.
cif((void*)add, &result, args); // result is 15
// Reuse the same trampoline to call `subtract`.
cif((void*)subtract, &result, args); // result is 5
void(* infix_unbound_cif_func)(void *, void *, void **)
A function pointer type for an unbound forward trampoline.
Definition infix.h:361
c23_nodiscard infix_status infix_forward_create_unbound(infix_forward_t **, const char *, infix_registry_t *)
Creates an "unbound" forward trampoline from a signature string.
Definition trampoline.c:926
c23_nodiscard infix_unbound_cif_func infix_forward_get_unbound_code(infix_forward_t *)
Gets the callable function pointer from an unbound forward trampoline.
Definition trampoline.c:282

◆ infix_reverse_create_callback()

c23_nodiscard infix_status infix_reverse_create_callback ( infix_reverse_t **  out_context,
const char *  signature,
void *  user_callback_fn,
infix_registry_t registry 
)

Creates a type-safe reverse trampoline (callback).

This function generates a native C function pointer that, when called by external C code, will invoke your user_callback_fn. This API is designed primarily for C/C++ developers, as the provided handler function must have a clean, type-safe C signature that exactly matches the one described in the signature string. This provides a high level of convenience and compile-time safety.

Parameters
[out]out_contextA pointer to an infix_reverse_t* that will receive the created context handle.
[in]signatureThe signature of the function pointer to be created (e.g., "(int, int)->int").
[in]user_callback_fnA pointer to a C function with a matching signature to handle the call.
[in]registryAn optional type registry.
Returns
INFIX_SUCCESS on success.
Note
The caller is responsible for destroying the handle with infix_reverse_destroy.
// 1. Define the type-safe C handler function.
// Its signature must match "(int, int)->int".
int my_handler(int a, int b) {
return a * b;
}
// 2. Create the reverse trampoline.
infix_reverse_t* ctx = NULL;
infix_reverse_create_callback(&ctx, "(int,int)->int", (void*)my_handler, NULL);
// 3. Get the JIT-compiled C function pointer.
typedef int (*my_func_ptr_t)(int, int);
my_func_ptr_t func_ptr = (my_func_ptr_t)infix_reverse_get_code(ctx);
// 4. Pass this `func_ptr` to some C library that expects a callback.
// some_c_library_function(func_ptr);
// When the library calls func_ptr(5, 10), `my_handler` will be invoked
// and will return 50.
c23_nodiscard infix_status infix_reverse_create_callback(infix_reverse_t **, const char *, void *, infix_registry_t *)
Creates a type-safe reverse trampoline (callback).
Definition trampoline.c:932
c23_nodiscard void * infix_reverse_get_code(const infix_reverse_t *)
Gets the native, callable C function pointer from a reverse trampoline.
Definition trampoline.c:813
void infix_reverse_destroy(infix_reverse_t *)
Destroys a reverse trampoline and frees all associated memory.
Definition trampoline.c:794
Internal definition of a reverse trampoline (callback/closure) handle.
Definition infix_internals.h:121

◆ infix_reverse_create_closure()

c23_nodiscard infix_status infix_reverse_create_closure ( infix_reverse_t **  out_context,
const char *  signature,
infix_closure_handler_fn  user_callback_fn,
void *  user_data,
infix_registry_t registry 
)

Creates a generic reverse trampoline (closure) for stateful callbacks.

This is the low-level API for reverse calls, designed for language bindings and advanced use cases. The handler function has a generic signature (infix_closure_handler_fn) and receives arguments as a void** array. A user_data pointer can be provided to maintain state between calls, making it a "closure".

This is the most flexible way to handle callbacks, as it allows the handler to be implemented in another language and to access state associated with the callback object.

Parameters
[out]out_contextA pointer to an infix_reverse_t* that will receive the created context handle.
[in]signatureThe signature of the function pointer to be created.
[in]user_callback_fnA pointer to a generic infix_closure_handler_fn.
[in]user_dataA void* pointer to application-specific state. This pointer can be retrieved inside the handler via infix_reverse_get_user_data(context).
[in]registryAn optional type registry.
Returns
INFIX_SUCCESS on success.
Note
The caller is responsible for destroying the handle with infix_reverse_destroy.
// User-defined state for our closure.
typedef struct {
int call_count;
} my_state_t;
// 1. Define the generic closure handler.
void my_closure_handler(infix_context_t* ctx, void* ret_val, void** args) {
// Retrieve our state.
my_state_t* state = (my_state_t*)infix_reverse_get_user_data(ctx);
state->call_count++;
// Unpack arguments from the void** array.
int a = *(int*)args[0];
int b = *(int*)args[1];
// Perform the operation and write to the return value buffer.
int result = (a + b) * state->call_count;
memcpy(ret_val, &result, sizeof(int));
}
// 2. Create the state and the closure.
my_state_t my_state = { .call_count = 0 };
infix_reverse_t* ctx = NULL;
infix_reverse_create_closure(&ctx, "(int,int)->int", my_closure_handler, &my_state, NULL);
// 3. Get the JIT-compiled C function pointer.
int (*func_ptr)(int, int) = infix_reverse_get_code(ctx);
// 4. Pass the func_ptr to C code.
int result1 = func_ptr(10, 5); // result1 is (10+5)*1 = 15
int result2 = func_ptr(2, 3); // result2 is (2+3)*2 = 10
c23_nodiscard infix_status infix_reverse_create_closure(infix_reverse_t **, const char *, infix_closure_handler_fn, void *, infix_registry_t *)
Creates a generic reverse trampoline (closure) for stateful callbacks.
Definition trampoline.c:962
c23_nodiscard void * infix_reverse_get_user_data(const infix_reverse_t *)
Gets the user-provided data pointer from a closure context.
Definition trampoline.c:824

◆ infix_signature_parse()

c23_nodiscard infix_status infix_signature_parse ( const char *  signature,
infix_arena_t **  out_arena,
infix_type **  out_ret_type,
infix_function_argument **  out_args,
size_t *  out_num_args,
size_t *  out_num_fixed_args,
infix_registry_t registry 
)

Parses a full function signature string into its constituent parts.

This function provides a way to deconstruct a signature string into its components (return_type, arg_types, etc.) without generating a trampoline. It is useful for introspection and for preparing arguments for the Manual API.

Parameters
[in]signatureThe signature string to parse.
[out]out_arenaOn success, receives a pointer to an arena holding all parsed types. The caller owns this and must free it with infix_arena_destroy.
[out]out_ret_typeOn success, receives a pointer to the return type.
[out]out_argsOn success, receives a pointer to the array of infix_function_argument structs.
[out]out_num_argsOn success, receives the total number of arguments.
[out]out_num_fixed_argsOn success, receives the number of fixed (non-variadic) arguments.
[in]registryAn optional type registry.
Returns
INFIX_SUCCESS on success.

Like infix_type_from_signature, this function orchestrates the full "Parse -> Estimate -> Copy -> Resolve -> Layout" pipeline, but for a function signature. It unpacks the final, resolved components for the caller.

Parameters
[in]signatureThe signature string to parse.
[out]out_arenaOn success, receives a pointer to an arena holding all parsed types. The caller owns this and must free it with infix_arena_destroy.
[out]out_ret_typeOn success, receives a pointer to the return type.
[out]out_argsOn success, receives a pointer to the array of infix_function_argument structs.
[out]out_num_argsOn success, receives the total number of arguments.
[out]out_num_fixed_argsOn success, receives the number of fixed (non-variadic) arguments.
[in]registryAn optional type registry.
Returns
INFIX_SUCCESS on success.

◆ infix_type_from_signature()

c23_nodiscard infix_status infix_type_from_signature ( infix_type **  out_type,
infix_arena_t **  out_arena,
const char *  signature,
infix_registry_t registry 
)

Parses a signature string representing a single data type.

This is the core function for introspection, allowing you to get a detailed, fully resolved memory layout for any C type described by a signature.

Parameters
[out]out_typeOn success, receives a pointer to the parsed type object.
[out]out_arenaOn success, receives a pointer to the arena holding the type. The caller must free this with infix_arena_destroy.
[in]signatureThe signature string of the data type (e.g., "{id:int, name:*char}").
[in]registryAn optional type registry for resolving named types.
Returns
INFIX_SUCCESS on success.

This function orchestrates the full **"Parse -> Estimate -> Copy -> Resolve -> Layout"** pipeline for a single type, resulting in a fully resolved and laid-out infix_type object graph.

Parameters
[out]out_typeOn success, receives a pointer to the parsed type object.
[out]out_arenaOn success, receives a pointer to the arena holding the type. The caller is responsible for freeing this with infix_arena_destroy.
[in]signatureThe signature string of the data type (e.g., "{id:int, name:*char}").
[in]registryAn optional type registry for resolving named types. Can be nullptr.
Returns
INFIX_SUCCESS on success.

Variable Documentation

◆ [] [1/2]

infix_aggregate_category_t { ... } ::aggregate_category

The expected kind of aggregate (struct or union).

◆ aggregate_category [2/2]

infix_aggregate_category_t infix_type_t::aggregate_category

The expected kind of aggregate (struct or union).

◆ [struct] [1/2]

struct { ... } infix_type_t::aggregate_info

Metadata for INFIX_TYPE_STRUCT and INFIX_TYPE_UNION.

◆ [struct] [2/2]

struct { ... } infix_type_t::aggregate_info

Metadata for INFIX_TYPE_STRUCT and INFIX_TYPE_UNION.

◆ alignment

size_t infix_type_t::alignment

The alignment requirement of the type in bytes.

◆ arena

infix_arena_t* infix_type_t::arena

A pointer to the arena that owns this type object, or nullptr if static.

◆ [] [1/2]

infix_function_argument* { ... } ::args

An array of the function's arguments.

◆ args [2/2]

infix_function_argument* infix_type_t::args

An array of the function's arguments.

◆ [struct] [1/2]

struct { ... } infix_type_t::array_info

Metadata for INFIX_TYPE_ARRAY.

◆ [struct] [2/2]

struct { ... } infix_type_t::array_info

Metadata for INFIX_TYPE_ARRAY.

◆ [] [1/2]

struct infix_type_t* { ... } ::base_type

The base floating-point type (float or double).

◆ base_type [2/2]

struct infix_type_t* infix_type_t::base_type

The base floating-point type (float or double).

◆ category [1/2]

infix_type_category infix_type_t::category

The fundamental category of the type.

◆ category [2/2]

infix_error_category_t infix_error_details_t::category

The general category of the error.

◆ code

infix_error_code_t infix_error_details_t::code

The specific error code.

◆ [struct] [1/2]

struct { ... } infix_type_t::complex_info

Metadata for INFIX_TYPE_COMPLEX.

◆ [struct] [2/2]

struct { ... } infix_type_t::complex_info

Metadata for INFIX_TYPE_COMPLEX.

◆ element_type [1/3]

struct infix_type_t* infix_type_t::element_type

The type of each element in the array.

The primitive type of each element in the vector.

◆ [] [2/3]

struct infix_type_t* { ... } ::element_type

The type of each element in the array.

◆ [] [3/3]

struct infix_type_t* { ... } ::element_type

The primitive type of each element in the vector.

◆ [struct] [1/2]

struct { ... } infix_type_t::enum_info

Metadata for INFIX_TYPE_ENUM.

◆ [struct] [2/2]

struct { ... } infix_type_t::enum_info

Metadata for INFIX_TYPE_ENUM.

◆ [struct] [1/2]

struct { ... } infix_type_t::func_ptr_info

Metadata for INFIX_TYPE_REVERSE_TRAMPOLINE.

◆ [struct] [2/2]

struct { ... } infix_type_t::func_ptr_info

Metadata for INFIX_TYPE_REVERSE_TRAMPOLINE.

◆ is_arena_allocated

bool infix_type_t::is_arena_allocated

True if this type object lives in an arena and must be freed with it.

◆ members [1/2]

infix_struct_member* infix_type_t::members

An array of the aggregate's members.

◆ [] [2/2]

infix_struct_member* { ... } ::members

An array of the aggregate's members.

◆ message

char infix_error_details_t::message[256]

A human-readable description of the error. For parser errors, this includes a code snippet.

◆ [union]

union { ... } infix_type_t::meta

A union containing metadata specific to the type's category.

◆ name [1/4]

const char* infix_type_t::name

The semantic alias of the type (e.g., "MyInt"), or nullptr if anonymous.

The name to be looked up in a registry.

◆ [] [2/4]

const char* { ... } ::name

The name to be looked up in a registry.

◆ name [3/4]

const char* infix_struct_member_t::name

The name of the member, or nullptr if anonymous.

◆ name [4/4]

const char* infix_function_argument_t::name

The name of the argument, or nullptr if anonymous.

◆ [struct] [1/2]

struct { ... } infix_type_t::named_reference

Metadata for INFIX_TYPE_NAMED_REFERENCE.

◆ [struct] [2/2]

struct { ... } infix_type_t::named_reference

Metadata for INFIX_TYPE_NAMED_REFERENCE.

◆ [] [1/2]

size_t { ... } ::num_args

The total number of arguments.

◆ num_args [2/2]

size_t infix_type_t::num_args

The total number of arguments.

◆ num_elements [1/3]

size_t infix_type_t::num_elements

The number of elements in the array.

The number of elements in the vector.

◆ [] [2/3]

size_t { ... } ::num_elements

The number of elements in the array.

◆ [] [3/3]

size_t { ... } ::num_elements

The number of elements in the vector.

◆ num_fixed_args [1/2]

size_t infix_type_t::num_fixed_args

The number of non-variadic arguments.

◆ [] [2/2]

size_t { ... } ::num_fixed_args

The number of non-variadic arguments.

◆ num_members [1/2]

size_t infix_type_t::num_members

The number of members in the array.

◆ [] [2/2]

size_t { ... } ::num_members

The number of members in the array.

◆ offset

size_t infix_struct_member_t::offset

The byte offset of the member from the start of the aggregate.

◆ pointee_type [1/2]

struct infix_type_t* infix_type_t::pointee_type

The type that this pointer points to.

◆ [] [2/2]

struct infix_type_t* { ... } ::pointee_type

The type that this pointer points to.

◆ [struct] [1/2]

struct { ... } infix_type_t::pointer_info

Metadata for INFIX_TYPE_POINTER.

◆ [struct] [2/2]

struct { ... } infix_type_t::pointer_info

Metadata for INFIX_TYPE_POINTER.

◆ position

size_t infix_error_details_t::position

For parser errors, the byte offset into the signature string.

◆ [] [1/2]

infix_primitive_type_id { ... } ::primitive_id

Metadata for INFIX_TYPE_PRIMITIVE.

◆ primitive_id [2/2]

infix_primitive_type_id infix_type_t::primitive_id

Metadata for INFIX_TYPE_PRIMITIVE.

◆ return_type [1/2]

struct infix_type_t* infix_type_t::return_type

The return type of the function.

◆ [] [2/2]

struct infix_type_t* { ... } ::return_type

The return type of the function.

◆ size

size_t infix_type_t::size

The size of the type in bytes.

◆ system_error_code

long infix_error_details_t::system_error_code

The OS-specific error code (e.g., from GetLastError() or errno).

◆ type [1/2]

infix_type* infix_struct_member_t::type

The infix_type of the member.

◆ type [2/2]

infix_type* infix_function_argument_t::type

The infix_type of the argument.

◆ underlying_type [1/2]

struct infix_type_t* infix_type_t::underlying_type

The underlying integer type of the enum.

◆ [] [2/2]

struct infix_type_t* { ... } ::underlying_type

The underlying integer type of the enum.

◆ [struct] [1/2]

struct { ... } infix_type_t::vector_info

Metadata for INFIX_TYPE_VECTOR.

◆ [struct] [2/2]

struct { ... } infix_type_t::vector_info

Metadata for INFIX_TYPE_VECTOR.