infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches

A semi-opaque structure that describes a C type. More...

#include <infix.h>

Collaboration diagram for infix_type_t:
[legend]

Public Attributes

const char * name
infix_type_category category
size_t size
size_t alignment
bool is_arena_allocated
bool is_incomplete
infix_arena_tinfix_arena_t * arena
size_t source_offset
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 
      bool   infix_type_t::is_packed 
   }   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 
      bool   infix_type_t::is_flexible 
   }   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...
} meta
 A union containing metadata specific to the type's category.

Detailed Description

A semi-opaque structure that describes a C type.

This structure contains all necessary metadata to determine a type's size, alignment, and ABI handling. While its fields are accessible for introspection, it should only be created via the provided API functions (e.g., infix_type_create_primitive, infix_type_from_signature).


The documentation for this struct was generated from the following file: