infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
infix.h
Go to the documentation of this file.
1
76#pragma once
83#define INFIX_MAJOR 0
84#define INFIX_MINOR 1
85#define INFIX_PATCH 1
87// Define the POSIX source macro to ensure function declarations for shm_open,
88// ftruncate, etc., are visible on all POSIX-compliant systems.
89// This must be defined before any system headers are included.
90#ifndef _DEFAULT_SOURCE
91#define _DEFAULT_SOURCE
92#endif
93// Define the POSIX source macro to ensure function declarations for posix_memalign
94// are visible. This must be defined before any system headers are included.
95#if !defined(_POSIX_C_SOURCE)
96#define _POSIX_C_SOURCE 200809L
97#endif
98#include "common/compat_c23.h"
99#include <stdbool.h>
100#include <stddef.h>
101#include <stdint.h>
102
103#ifdef __cplusplus
104extern "C" {
105#endif
125// Opaque and Semi-Opaque Type Forward Declarations
253 const char * name;
255 size_t offset;
256 uint8_t bit_width;
257 uint8_t bit_offset;
259};
// end of type_system group
288#ifndef infix_malloc
289#define infix_malloc malloc
290#endif
292#ifndef infix_calloc
293#define infix_calloc calloc
294#endif
296#ifndef infix_realloc
297#define infix_realloc realloc
298#endif
300#ifndef infix_free
301#define infix_free free
302#endif
304#ifndef infix_memcpy
305#define infix_memcpy memcpy
306#endif
308#ifndef infix_memset
309#define infix_memset memset
310#endif
// end of memory_management group
327typedef void (*infix_unbound_cif_func)(void *, void *, void **);
336typedef void (*infix_cif_func)(void *, void **);
348typedef void (*infix_closure_handler_fn)(infix_context_t *, void *, void **);
// end of registry_api group // end of registry_introspection_api group
723 const char *, infix_arena_t **, infix_type **, infix_function_argument **, size_t *, size_t *, infix_registry_t *);
// end of high_level_api group
775c23_nodiscard infix_status infix_read_global(infix_library_t *, const char *, const char *, void *, infix_registry_t *);
786infix_write_global(infix_library_t *, const char *, const char *, void *, infix_registry_t *);
// end of exports_api group
808infix_forward_create_manual(infix_forward_t **, infix_type *, infix_type **, size_t, size_t, void *);
844 infix_reverse_t **, infix_type *, infix_type **, size_t, size_t, infix_closure_handler_fn, void *);
932 infix_type **,
933 infix_type *);
951 infix_type **,
952 const char *,
// end of manual_api group (continued) // end of type_system group
1015c23_nodiscard void * infix_arena_alloc(infix_arena_t *, size_t, size_t);
1024c23_nodiscard void * infix_arena_calloc(infix_arena_t *, size_t, size_t, size_t);
// end of memory_management group (continued)
1065 size_t,
1066 const char *,
1067 const infix_type *,
1069 size_t,
1070 size_t,
1157c23_nodiscard const char * infix_type_get_name(const infix_type *);
1195c23_nodiscard const char * infix_type_get_arg_name(const infix_type *, size_t);
// end addtogroup type_system // end of introspection_api group // end of error_api group
1291typedef void (*infix_direct_cif_func)(void *, void **);
1292
1300typedef union {
1301 uint64_t u64;
1302 int64_t i64;
1303 double f64;
1304 void * ptr;
1306
1316typedef infix_direct_value_t (*infix_marshaller_fn)(void * source_object);
1317
1332typedef void (*infix_aggregate_marshaller_fn)(void * source_object, void * dest_buffer, const infix_type * type);
1333
1346typedef void (*infix_writeback_fn)(void * source_object, void * c_data_ptr, const infix_type * type);
1347
1362
1382 const char * signature,
1383 void * target_function,
// end of direct_marshalling_api group
1395#ifdef __cplusplus
1396}
1397#endif
infix_arena_t * arena
Definition 005_layouts.c:60
infix_registry_t * registry
Definition 008_registry_introspection.c:32
infix_direct_arg_handler_t handlers[2]
Definition 901_call_overhead.c:103
Provides forward compatibility macros for C23 features.
#define c23_nodiscard
A compatibility macro for the C23 [[nodiscard]] attribute.
Definition compat_c23.h:106
c23_nodiscard infix_status infix_forward_create_direct(infix_forward_t **out_trampoline, const char *signature, void *target_function, infix_direct_arg_handler_t *handlers, infix_registry_t *registry)
Creates a forward trampoline with direct, JIT-bound marshalling.
Definition trampoline.c:1000
void(* infix_direct_cif_func)(void *, void **)
A function pointer for a direct marshalling forward trampoline.
Definition infix.h:1291
void(* infix_aggregate_marshaller_fn)(void *source_object, void *dest_buffer, const infix_type *type)
A function pointer for a custom marshaller for aggregate types (structs/unions).
Definition infix.h:1332
infix_direct_value_t(* infix_marshaller_fn)(void *source_object)
A function pointer for a custom marshaller for scalar types.
Definition infix.h:1316
c23_nodiscard infix_direct_cif_func infix_forward_get_direct_code(infix_forward_t *trampoline)
Gets the callable function pointer from a direct marshalling trampoline.
Definition trampoline.c:283
void(* infix_writeback_fn)(void *source_object, void *c_data_ptr, const infix_type *type)
A function pointer for a "write-back" handler for out/in-out parameters.
Definition infix.h:1346
infix_error_code_t
Enumerates specific error codes.
Definition infix.h:1223
infix_error_details_t infix_get_last_error(void)
Retrieves detailed information about the last error that occurred on the current thread.
Definition error.c:271
infix_error_category_t
Enumerates the high-level categories of errors that can occur.
Definition infix.h:1213
@ INFIX_CODE_PROTECTION_FAILURE
Definition infix.h:1230
@ INFIX_CODE_SUCCESS
Definition infix.h:1225
@ INFIX_CODE_LAYOUT_FAILED
Definition infix.h:1244
@ INFIX_CODE_LIBRARY_NOT_FOUND
Definition infix.h:1246
@ INFIX_CODE_INVALID_MEMBER_TYPE
Definition infix.h:1243
@ INFIX_CODE_UNRESOLVED_NAMED_TYPE
Definition infix.h:1242
@ INFIX_CODE_INTEGER_OVERFLOW
Definition infix.h:1236
@ INFIX_CODE_TYPE_TOO_LARGE
Definition infix.h:1241
@ INFIX_CODE_UNEXPECTED_TOKEN
Definition infix.h:1232
@ INFIX_CODE_MISSING_RETURN_TYPE
Definition infix.h:1235
@ INFIX_CODE_EMPTY_MEMBER_NAME
Definition infix.h:1238
@ INFIX_CODE_EXECUTABLE_MEMORY_FAILURE
Definition infix.h:1229
@ INFIX_CODE_UNKNOWN
Definition infix.h:1226
@ INFIX_CODE_SYMBOL_NOT_FOUND
Definition infix.h:1247
@ INFIX_CODE_RECURSION_DEPTH_EXCEEDED
Definition infix.h:1237
@ INFIX_CODE_UNSUPPORTED_ABI
Definition infix.h:1240
@ INFIX_CODE_UNTERMINATED_AGGREGATE
Definition infix.h:1233
@ INFIX_CODE_LIBRARY_LOAD_FAILED
Definition infix.h:1248
@ INFIX_CODE_INVALID_KEYWORD
Definition infix.h:1234
@ INFIX_CODE_OUT_OF_MEMORY
Definition infix.h:1228
@ INFIX_CATEGORY_ABI
Definition infix.h:1218
@ INFIX_CATEGORY_ALLOCATION
Definition infix.h:1216
@ INFIX_CATEGORY_GENERAL
Definition infix.h:1215
@ INFIX_CATEGORY_PARSER
Definition infix.h:1217
@ INFIX_CATEGORY_NONE
Definition infix.h:1214
c23_nodiscard infix_status infix_write_global(infix_library_t *, const char *, const char *, void *, infix_registry_t *)
Writes data from a buffer into a global variable in a library.
Definition loader.c:189
void infix_library_close(infix_library_t *)
Closes a dynamic library handle.
Definition loader.c:90
c23_nodiscard void * infix_library_get_symbol(infix_library_t *, const char *)
Retrieves the address of a symbol (function or variable) from a loaded library.
Definition loader.c:121
c23_nodiscard infix_library_t * infix_library_open(const char *)
Opens a dynamic library and returns a handle to it.
Definition loader.c:46
c23_nodiscard infix_status infix_read_global(infix_library_t *, const char *, const char *, void *, infix_registry_t *)
Reads the value of a global variable from a library into a buffer.
Definition loader.c:147
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:1044
struct infix_type_t::@0::@1 pointer_info
Metadata for INFIX_TYPE_POINTER.
size_t position
Definition infix.h:1257
union infix_type_t::@0 meta
A union containing metadata specific to the type's category.
bool is_packed
Definition infix.h:213
struct infix_type_t::@0::@7 vector_info
Metadata for INFIX_TYPE_VECTOR.
infix_error_category_t category
Definition infix.h:1255
uint64_t u64
Used for all unsigned integer types up to 64 bits.
Definition infix.h:1301
infix_type * type
Definition infix.h:266
struct infix_type_t::@0::@4 func_ptr_info
Metadata for INFIX_TYPE_REVERSE_TRAMPOLINE.
void(* infix_cif_func)(void *, void **)
A function pointer type for a bound forward trampoline.
Definition infix.h:336
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.
Definition signature.c:1009
size_t num_elements
Definition infix.h:218
infix_arena_t * arena
Definition infix.h:200
size_t size
Definition infix.h:197
void(* infix_unbound_cif_func)(void *, void *, void **)
A function pointer type for an unbound forward trampoline.
Definition infix.h:327
size_t alignment
Definition infix.h:198
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:995
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:989
void * ptr
Used for all pointer types.
Definition infix.h:1304
uint8_t bit_offset
Definition infix.h:257
infix_writeback_fn writeback_handler
For "out" or "in-out" parameters. Called after the C function returns.
Definition infix.h:1360
infix_struct_member * members
Definition infix.h:211
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.
Definition trampoline.c:911
bool is_bitfield
Definition infix.h:258
struct infix_type_t::@0::@6 complex_info
Metadata for INFIX_TYPE_COMPLEX.
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:1072
const char * name
Definition infix.h:195
infix_function_argument * args
Definition infix.h:224
size_t num_elements
Definition infix.h:239
struct infix_type_t * element_type
Definition infix.h:238
infix_aggregate_category_t aggregate_category
Definition infix.h:244
infix_status
Enumerates the possible status codes returned by infix API functions.
Definition infix.h:352
const char * name
Definition infix.h:265
const char * name
Definition infix.h:243
const char * name
Definition infix.h:253
infix_type_category category
Definition infix.h:196
struct infix_type_t::@0::@2 aggregate_info
Metadata for INFIX_TYPE_STRUCT and INFIX_TYPE_UNION.
struct infix_type_t::@0::@3 array_info
Metadata for INFIX_TYPE_ARRAY.
struct infix_type_t * pointee_type
Definition infix.h:207
infix_marshaller_fn scalar_marshaller
For "in" parameters of a scalar type (int, float, pointer).
Definition infix.h:1356
infix_type * type
Definition infix.h:254
struct infix_type_t * element_type
Definition infix.h:217
bool is_flexible
Definition infix.h:219
struct infix_type_t * return_type
Definition infix.h:223
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.
Definition signature.c:1068
size_t offset
Definition infix.h:255
struct infix_type_t::@0::@5 enum_info
Metadata for INFIX_TYPE_ENUM.
infix_aggregate_marshaller_fn aggregate_marshaller
For "in" parameters of an aggregate type (struct, union).
Definition infix.h:1358
double f64
Used for float and double.
Definition infix.h:1303
struct infix_type_t * base_type
Definition infix.h:234
long system_error_code
Definition infix.h:1258
uint8_t bit_width
Definition infix.h:256
infix_error_code_t code
Definition infix.h:1256
int64_t i64
Used for all signed integer types up to 64 bits.
Definition infix.h:1302
size_t num_members
Definition infix.h:212
struct infix_type_t * underlying_type
Definition infix.h:230
struct infix_type_t::@0::@8 named_reference
Metadata for INFIX_TYPE_NAMED_REFERENCE.
size_t num_fixed_args
Definition infix.h:226
void(* infix_closure_handler_fn)(infix_context_t *, void *, void **)
A function pointer type for a generic closure handler.
Definition infix.h:348
infix_primitive_type_id primitive_id
Metadata for INFIX_TYPE_PRIMITIVE.
Definition infix.h:204
size_t num_args
Definition infix.h:225
bool is_arena_allocated
Definition infix.h:199
@ INFIX_ERROR_ALLOCATION_FAILED
Definition infix.h:354
@ INFIX_ERROR_LAYOUT_FAILED
Definition infix.h:357
@ INFIX_ERROR_
Definition infix.h:359
@ INFIX_ERROR_PROTECTION_FAILED
Definition infix.h:358
@ INFIX_ERROR_UNSUPPORTED_ABI
Definition infix.h:356
@ INFIX_SUCCESS
Definition infix.h:353
@ INFIX_ERROR_INVALID_ARGUMENT
Definition infix.h:355
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:278
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:895
c23_nodiscard infix_status infix_type_print(char *, size_t, const infix_type *, infix_print_dialect_t)
Serializes an infix_type object graph back into a signature string.
Definition signature.c:1531
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:273
c23_nodiscard size_t infix_forward_get_num_args(const infix_forward_t *)
Gets the total number of arguments for a forward trampoline.
Definition types.c:1321
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:905
c23_nodiscard infix_status infix_function_print(char *, size_t, const char *, const infix_type *, const infix_function_argument *, size_t, size_t, infix_print_dialect_t)
Serializes a function signature's components into a string.
Definition signature.c:1575
infix_print_dialect_t
Specifies the output format for printing types and function signatures.
Definition infix.h:1038
@ INFIX_DIALECT_SIGNATURE
Definition infix.h:1039
@ INFIX_DIALECT_ITANIUM_MANGLING
Definition infix.h:1040
@ INFIX_DIALECT_MSVC_MANGLING
Definition infix.h:1041
void infix_reverse_destroy(infix_reverse_t *)
Destroys a reverse trampoline and frees all associated memory.
Definition trampoline.c:877
c23_nodiscard infix_status infix_forward_create_manual(infix_forward_t **, infix_type *, infix_type **, size_t, size_t, void *)
Creates a bound forward trampoline from infix_type objects.
Definition trampoline.c:589
c23_nodiscard infix_status infix_reverse_create_callback_manual(infix_reverse_t **, infix_type *, infix_type **, size_t, size_t, void *)
Creates a type-safe reverse trampoline (callback) from infix_type objects.
Definition trampoline.c:838
c23_nodiscard infix_status infix_reverse_create_closure_manual(infix_reverse_t **, infix_type *, infix_type **, size_t, size_t, infix_closure_handler_fn, void *)
Creates a generic reverse trampoline (closure) from infix_type objects.
Definition trampoline.c:859
c23_nodiscard infix_status infix_forward_create_unbound_manual(infix_forward_t **, infix_type *, infix_type **, size_t, size_t)
Creates an unbound forward trampoline from infix_type objects.
Definition trampoline.c:615
void infix_forward_destroy(infix_forward_t *)
Destroys a forward trampoline and frees all associated memory.
Definition trampoline.c:631
void infix_arena_destroy(infix_arena_t *)
Destroys an arena and frees all memory allocated from it.
Definition arena.c:83
c23_nodiscard void * infix_arena_calloc(infix_arena_t *, size_t, size_t, size_t)
Allocates and zero-initializes a block of memory from an arena.
Definition arena.c:179
c23_nodiscard void * infix_arena_alloc(infix_arena_t *, size_t, size_t)
Allocates a block of memory from an arena.
Definition arena.c:117
c23_nodiscard infix_arena_t * infix_arena_create(size_t)
Creates a new memory arena.
Definition arena.c:52
void infix_registry_destroy(infix_registry_t *)
Destroys a type registry and frees all associated memory.
Definition type_registry.c:216
c23_nodiscard infix_status infix_register_types(infix_registry_t *, const char *)
Parses a string of type definitions and adds them to a registry.
Definition type_registry.c:430
c23_nodiscard infix_registry_t * infix_registry_create(void)
Creates a new, empty named type registry.
Definition type_registry.c:145
c23_nodiscard const infix_type * infix_registry_lookup_type(const infix_registry_t *, const char *)
Retrieves the canonical infix_type object for a given name from the registry.
Definition type_registry.c:740
c23_nodiscard infix_registry_t * infix_registry_create_in_arena(infix_arena_t *arena)
Creates a new named type registry that allocates from a user-provided arena.
Definition type_registry.c:183
c23_nodiscard const infix_type * infix_registry_iterator_get_type(const infix_registry_iterator_t *)
Gets the infix_type object of the type at the iterator's current position.
Definition type_registry.c:709
c23_nodiscard infix_status infix_registry_print(char *, size_t, const infix_registry_t *)
Serializes all defined types within a registry into a single, human-readable string.
Definition signature.c:1640
c23_nodiscard infix_registry_iterator_t infix_registry_iterator_begin(const infix_registry_t *)
Initializes an iterator for traversing the types in a registry.
Definition type_registry.c:645
c23_nodiscard bool infix_registry_iterator_next(infix_registry_iterator_t *)
Advances the iterator to the next defined type in the registry.
Definition type_registry.c:657
c23_nodiscard const char * infix_registry_iterator_get_name(const infix_registry_iterator_t *)
Gets the name of the type at the iterator's current position.
Definition type_registry.c:696
c23_nodiscard bool infix_registry_is_defined(const infix_registry_t *, const char *)
Checks if a type with the given name is fully defined in the registry.
Definition type_registry.c:724
c23_nodiscard infix_status infix_type_create_packed_struct(infix_arena_t *, infix_type **, size_t, size_t, infix_struct_member *, size_t)
Creates a new packed struct type with a user-specified layout.
Definition types.c:744
c23_nodiscard size_t infix_type_get_size(const infix_type *)
Gets the size of a type in bytes.
Definition types.c:1261
infix_status infix_type_create_flexible_array(infix_arena_t *, infix_type **, infix_type *)
Creates a flexible array member type ([?:type]).
Definition types.c:493
c23_nodiscard const infix_type * infix_type_get_arg_type(const infix_type *, size_t)
Gets the type of a specific argument from a function type.
Definition types.c:1310
c23_nodiscard infix_type * infix_type_create_void(void)
Creates a static descriptor for the void type.
Definition types.c:183
c23_nodiscard size_t infix_type_get_alignment(const infix_type *)
Gets the alignment requirement of a type in bytes.
Definition types.c:1267
c23_nodiscard size_t infix_forward_get_num_fixed_args(const infix_forward_t *)
Gets the number of fixed (non-variadic) arguments for a forward trampoline.
Definition types.c:1329
c23_nodiscard const char * infix_type_get_name(const infix_type *)
Gets the semantic alias of a type, if one exists.
Definition types.c:1243
c23_nodiscard const infix_type * infix_forward_get_return_type(const infix_forward_t *)
Gets the return type for a forward trampoline.
Definition types.c:1337
infix_primitive_type_id
Enumerates the supported primitive C types.
Definition infix.h:164
c23_nodiscard const infix_type * infix_forward_get_arg_type(const infix_forward_t *, size_t)
Gets the type of a specific argument for a forward trampoline.
Definition types.c:1346
c23_nodiscard infix_status infix_type_create_union(infix_arena_t *, infix_type **, infix_struct_member *, size_t)
Creates a new union type from an array of members.
Definition types.c:638
c23_nodiscard infix_status infix_type_create_enum(infix_arena_t *, infix_type **, infix_type *)
Creates a new enum type with a specified underlying integer type.
Definition types.c:536
c23_nodiscard infix_status infix_type_create_vector(infix_arena_t *, infix_type **, infix_type *, size_t)
Creates a new SIMD vector type.
Definition types.c:600
c23_nodiscard const infix_type * infix_reverse_get_return_type(const infix_reverse_t *)
Gets the return type for a reverse trampoline.
Definition types.c:1372
c23_nodiscard infix_type * infix_type_create_pointer(void)
Creates a static descriptor for a generic pointer (void*).
Definition types.c:178
c23_nodiscard infix_status infix_type_create_complex(infix_arena_t *, infix_type **, infix_type *)
Creates a new _Complex number type.
Definition types.c:570
c23_nodiscard size_t infix_reverse_get_num_args(const infix_reverse_t *)
Gets the total number of arguments for a reverse trampoline.
Definition types.c:1356
c23_nodiscard size_t infix_type_get_member_count(const infix_type *)
Gets the number of members in a struct or union type.
Definition types.c:1274
c23_nodiscard const char * infix_type_get_arg_name(const infix_type *, size_t)
Gets the name of a specific argument from a function type.
Definition types.c:1298
infix_type_category
Enumerates the fundamental categories of types that infix can represent.
Definition infix.h:148
c23_nodiscard infix_type_category infix_type_get_category(const infix_type *)
Gets the fundamental category of a type.
Definition types.c:1253
c23_nodiscard infix_status infix_type_create_array(infix_arena_t *, infix_type **, infix_type *, size_t)
Creates a new fixed-size array type.
Definition types.c:455
c23_nodiscard infix_status infix_type_create_pointer_to(infix_arena_t *, infix_type **, infix_type *)
Creates a new pointer type that points to a specific type.
Definition types.c:425
infix_aggregate_category_t
Specifies whether a named type reference refers to a struct or a union.
Definition infix.h:184
infix_struct_member infix_type_create_bitfield_member(const char *, infix_type *, size_t, uint8_t)
A factory function to create a bitfield infix_struct_member.
Definition types.c:202
c23_nodiscard infix_status infix_type_create_struct(infix_arena_t *, infix_type **, infix_struct_member *, size_t)
Creates a new struct type from an array of members, calculating layout automatically.
Definition types.c:685
infix_reverse_t infix_context_t
An alias for infix_reverse_t, used to clarify its role as a context object in closure handlers.
Definition infix.h:138
c23_nodiscard infix_status infix_type_create_named_reference(infix_arena_t *, infix_type **, const char *, infix_aggregate_category_t)
Creates a placeholder for a named type to be resolved by a registry.
Definition types.c:792
c23_nodiscard const infix_type * infix_reverse_get_arg_type(const infix_reverse_t *, size_t)
Gets the type of a specific argument for a reverse trampoline.
Definition types.c:1381
c23_nodiscard size_t infix_reverse_get_num_fixed_args(const infix_reverse_t *)
Gets the number of fixed (non-variadic) arguments for a reverse trampoline.
Definition types.c:1364
c23_nodiscard infix_type * infix_type_create_primitive(infix_primitive_type_id)
Creates a static descriptor for a primitive C type.
Definition types.c:130
infix_struct_member infix_type_create_member(const char *, infix_type *, size_t)
A factory function to create an infix_struct_member.
Definition types.c:191
c23_nodiscard const infix_struct_member * infix_type_get_member(const infix_type *, size_t)
Gets a specific member from a struct or union type.
Definition types.c:1285
@ INFIX_PRIMITIVE_UINT16
Definition infix.h:168
@ INFIX_PRIMITIVE_UINT32
Definition infix.h:170
@ INFIX_PRIMITIVE_LONG_DOUBLE
Definition infix.h:178
@ INFIX_PRIMITIVE_FLOAT
Definition infix.h:176
@ INFIX_PRIMITIVE_DOUBLE
Definition infix.h:177
@ INFIX_PRIMITIVE_SINT16
Definition infix.h:169
@ INFIX_PRIMITIVE_SINT64
Definition infix.h:173
@ INFIX_PRIMITIVE_SINT32
Definition infix.h:171
@ INFIX_PRIMITIVE_UINT8
Definition infix.h:166
@ INFIX_PRIMITIVE_UINT128
Definition infix.h:174
@ INFIX_PRIMITIVE_BOOL
Definition infix.h:165
@ INFIX_PRIMITIVE_UINT64
Definition infix.h:172
@ INFIX_PRIMITIVE_SINT128
Definition infix.h:175
@ INFIX_PRIMITIVE_SINT8
Definition infix.h:167
@ INFIX_TYPE_UNION
Definition infix.h:152
@ INFIX_TYPE_PRIMITIVE
Definition infix.h:149
@ INFIX_TYPE_COMPLEX
Definition infix.h:156
@ INFIX_TYPE_ARRAY
Definition infix.h:153
@ INFIX_TYPE_VECTOR
Definition infix.h:157
@ INFIX_TYPE_VOID
Definition infix.h:159
@ INFIX_TYPE_POINTER
Definition infix.h:150
@ INFIX_TYPE_NAMED_REFERENCE
Definition infix.h:158
@ INFIX_TYPE_REVERSE_TRAMPOLINE
Definition infix.h:154
@ INFIX_TYPE_ENUM
Definition infix.h:155
@ INFIX_TYPE_STRUCT
Definition infix.h:151
@ INFIX_AGGREGATE_STRUCT
Definition infix.h:184
@ INFIX_AGGREGATE_UNION
Definition infix.h:184
Internal definition of a memory arena.
Definition infix_internals.h:138
A struct containing all the necessary handlers for a single function argument.
Definition infix.h:1354
Provides detailed, thread-local information about the last error that occurred.
Definition infix.h:1254
Internal definition of a forward trampoline handle.
Definition infix_internals.h:88
Describes a single argument to a C function.
Definition infix.h:264
Internal definition of a dynamic library handle.
Definition infix_internals.h:207
Internal definition of a registry iterator.
Definition infix_internals.h:179
Internal definition of a named type registry.
Definition infix_internals.h:165
Internal definition of a reverse trampoline (callback/closure) handle.
Definition infix_internals.h:114
Describes a single member of a C struct or union.
Definition infix.h:252
A semi-opaque structure that describes a C type.
Definition infix.h:194
A union to hold any primitive value returned by a scalar marshaller.
Definition infix.h:1300