x-engine-c v0.2.13
The C engine for x-lang
Loading...
Searching...
No Matches
x_type_t Struct Reference

C-side mirror of a type descriptor's fields. More...

#include <x-type.h>

Data Fields

x_obj_tp_name
 
x_obj_tp_data
 
x_obj_tp_mark
 
x_obj_tp_make
 
x_obj_tp_free
 
x_obj_tp_clone
 
x_obj_tp_units
 
x_obj_tp_length
 
x_obj_tp_call
 
x_obj_tp_eval
 
x_obj_tp_from
 
x_obj_tp_to
 
x_obj_tp_analyse
 
x_obj_tp_delimit
 
x_obj_tp_read
 
x_obj_tp_write
 
x_obj_tp_display
 
x_obj_tp_iter
 
x_obj_tp_ops
 
x_obj_tp_save
 
x_obj_tp_load
 

Detailed Description

C-side mirror of a type descriptor's fields.

Passed to x_type_struct_make() to build a type pair tree from named C fields. Any NULL field is stored as nil in the tree.

Field Documentation

◆ p_analyse

x_obj_t* x_type_t::p_analyse

Tokenizer analyse handler.

◆ p_call

x_obj_t* x_type_t::p_call

Call handler.

◆ p_clone

x_obj_t* x_type_t::p_clone

Clone handler.

◆ p_data

x_obj_t* x_type_t::p_data

Arbitrary type-specific data.

◆ p_delimit

x_obj_t* x_type_t::p_delimit

Delimiter handler.

◆ p_display

x_obj_t* x_type_t::p_display

Display handler.

◆ p_eval

x_obj_t* x_type_t::p_eval

Eval handler.

◆ p_free

x_obj_t* x_type_t::p_free

Destructor handler.

◆ p_from

x_obj_t* x_type_t::p_from

From-conversion handler.

◆ p_iter

x_obj_t* x_type_t::p_iter

Iterator handler.

◆ p_length

x_obj_t* x_type_t::p_length

Length handler.

◆ p_load

x_obj_t* x_type_t::p_load

Image load handler: (load obj), called once the rebuilt object's units are patched; a type whose payload is more than its units (BUFFER) fixes itself up here. NULL: nothing to do.

◆ p_make

x_obj_t* x_type_t::p_make

Constructor handler.

◆ p_mark

x_obj_t* x_type_t::p_mark

GC mark handler.

◆ p_name

x_obj_t* x_type_t::p_name

Type name symbol.

◆ p_ops

x_obj_t* x_type_t::p_ops

Generic-operator alist ((op-sym . handler) ...).

◆ p_read

x_obj_t* x_type_t::p_read

Reader handler.

◆ p_save

x_obj_t* x_type_t::p_save

Image save handler, applied by (image save!) with EVALUATED args (obj buf): writes the unit count at buf[0] and [kind][word] pairs after it, returns obj. NULL selects x_type_save_default – the units shape. No handler evaluates or allocates: the per-type files link without x-eval and x-prim.

◆ p_to

x_obj_t* x_type_t::p_to

To-conversion handler.

◆ p_units

x_obj_t* x_type_t::p_units

Unit shape: read (never called) by the GC, the spine guard, and x_type_prim_units. Two forms, see x_type_units_count(): an INT atom is a bare count (negative = dynamic-size sentinel, instance slot 0 holds the payload count); a pair (count . mask) adds a kind per unit – see X_TYPE_UNIT_REF.

◆ p_write

x_obj_t* x_type_t::p_write

Writer handler.


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